[Fix] (Pipe): fill the capability set on a texture op and a dispatch, and the shader blit's viewport, provoking vertex and buffer bindings

- The verify retrace aborted four cases with Fatal{UnmigratedPipeInput,
  "IsCapabilityEnabled@GenerateMipmap"} (x3) and "@DispatchCompute" (x1):
  Magma materialises a texture's queued clear inside both verbs
  (GenerateMipmap -> MaterializePendingClearForTexture,
  DispatchCompute -> PrepareStorageImageTextures -> the same), and the clear
  pre-compensates its colour against GL_FRAMEBUFFER_SRGB in
  VkClearManager::PreCompensateSrgbClearColor. Neither class named the field.
- Audited every class the same way rather than stopping at those two rows. Two
  more helper-program draws sit inside verbs whose class did not name what they
  read: GenerateMipmap takes GenerateDepthMipmapWithShader for a depth texture
  and BlitFramebuffer takes TryBlitToDefaultFramebufferWithShader for the
  default framebuffer. Both bind their helper's descriptors through
  BindProgramUniformBuffers, whose sampler resolver reads the draw framebuffer
  for its feedback-loop check and whose buffer-block resolvers read the frontend
  binding points; the blit additionally sets the dynamic viewport through
  ApplyGLViewportState -> ComputeGLViewport and picks its pipeline's provoking
  vertex through GetOrCreateBlitPipeline -> SelectProvokingVertexMode.
- kTextureOp gains IsCapabilityEnabled, GetFramebufferBindingSlot and
  GetBufferBindingPoint; kDispatch gains IsCapabilityEnabled; kBlitOrCopy gains
  GetViewportIndexed, GetDepthRangeIndexed, GetProvokingVertexMode and
  GetBufferBindingPoint. Every row carries the path it was derived from.
- Also unfolds the kReadback transform-feedback rows 9087f133 landed on one
  1200-column line back into the file's one-row-per-line shape; no row changes.
This commit is contained in:
2026-09-06 05:31:50 -04:00
parent 97b997d5da
commit 80a6b39003
2 changed files with 36 additions and 7 deletions
+30 -1
View File
@@ -173,6 +173,10 @@
X(kDispatch, GetSamplingResolutionGeneration) \
X(kDispatch, GetImageTextureBinding) \
X(kDispatch, GetFramebufferBindingSlot) \
/* Magma's PrepareStorageImageTextures materialises a queued clear for every */ \
/* storage image the dispatch writes, and the clear pre-compensates its colour */ \
/* against GL_FRAMEBUFFER_SRGB (VkClearManager::PreCompensateSrgbClearColor). */ \
X(kDispatch, IsCapabilityEnabled) \
X(kDispatch, GetPatchVertices) \
X(kDispatch, GetPatchDefaultOuterLevel) \
X(kDispatch, GetPatchDefaultInnerLevel) \
@@ -214,6 +218,17 @@
X(kBlitOrCopy, GetColorMaskIndexed) \
X(kBlitOrCopy, GetDepthMask) \
X(kBlitOrCopy, GetStencilState) \
/* Magma's shader blit to the default framebuffer */ \
/* (TryBlitToDefaultFramebufferWithShader) is a real draw of a backend-owned */ \
/* helper program: it sets the dynamic viewport through ApplyGLViewportState */ \
/* -> ComputeGLViewport (viewport 0 and its depth range), picks the pipeline's */ \
/* provoking vertex through GetOrCreateBlitPipeline -> SelectProvokingVertexMode, */ \
/* and binds the helper's descriptors through BindProgramUniformBuffers, whose */ \
/* buffer-block resolvers read the frontend binding points. */ \
X(kBlitOrCopy, GetViewportIndexed) \
X(kBlitOrCopy, GetDepthRangeIndexed) \
X(kBlitOrCopy, GetProvokingVertexMode) \
X(kBlitOrCopy, GetBufferBindingPoint) \
/* kTextureOp */ \
X(kTextureOp, GetActiveTextureUnit) \
X(kTextureOp, GetTextureUnitObject) \
@@ -222,6 +237,15 @@
X(kTextureOp, GetSamplingResolutionGeneration) \
X(kTextureOp, GetTextureBindGeneration) \
X(kTextureOp, GetMaxTouchedTextureUnit) \
/* Magma's GenerateMipmap materialises the texture's queued clear before it */ \
/* blits (MaterializePendingClearForTexture -> PreCompensateSrgbClearColor, */ \
/* which reads GL_FRAMEBUFFER_SRGB), and a depth texture takes the shader path */ \
/* (GenerateDepthMipmapWithShader -> BindProgramUniformBuffers), whose sampler */ \
/* resolver reads the draw framebuffer for the feedback-loop check and whose */ \
/* buffer-block resolvers read the frontend binding points. */ \
X(kTextureOp, IsCapabilityEnabled) \
X(kTextureOp, GetFramebufferBindingSlot) \
X(kTextureOp, GetBufferBindingPoint) \
/* kReadback */ \
X(kReadback, GetPixelStoreParameters) \
X(kReadback, GetBufferBindingSlot) \
@@ -237,7 +261,12 @@
X(kReadback, GetSamplingResolutionGeneration) \
X(kReadback, GetTextureBindGeneration) \
X(kReadback, GetMaxTouchedTextureUnit) \
X(kReadback, GetImageTextureBinding) /* The depth/stencil read emulation draws (ScopedEmulationDrawState, */ /* DirectGLES.cpp:5224) and pauses an active capture around its own draw, so */ /* a readback reads the transform-feedback state exactly as a draw does. */ X(kReadback, IsTransformFeedbackActive) X(kReadback, IsTransformFeedbackPaused) \
X(kReadback, GetImageTextureBinding) \
/* The depth/stencil read emulation draws (ScopedEmulationDrawState, */ \
/* DirectGLES.cpp) and pauses an active capture around its own draw, so a */ \
/* readback reads the transform-feedback state exactly as a draw does. */ \
X(kReadback, IsTransformFeedbackActive) \
X(kReadback, IsTransformFeedbackPaused) \
/* kXfbSpan */ \
X(kXfbSpan, GetTransformFeedbackProgram) \
X(kXfbSpan, GetBufferBindingPoint) \
@@ -279,14 +279,14 @@ inline constexpr Bool MGPipeFieldMaskHas(const MGPipeFieldMask& mask, MGPipeInpu
inline constexpr MGPipeFieldMask kMGPipeClassFieldMask[kMGPipeVerbClassCount] = {
// kDraw: 54 fields (47 own + 7 sticky)
{{0x7ffbfff7bfffc3eeull, 0x0000000000000000ull}},
// kDispatch: 21 fields (14 own + 7 sticky)
{{0x5c00f2281d3003c0ull, 0x0000000000000000ull}},
// kDispatch: 22 fields (15 own + 7 sticky)
{{0x5c40f2281d3003c0ull, 0x0000000000000000ull}},
// kClear: 25 fields (18 own + 7 sticky)
{{0x5c50ffa001347900ull, 0x0000000000000000ull}},
// kBlitOrCopy: 25 fields (18 own + 7 sticky)
{{0x5f50ffa001344101ull, 0x0000000000000000ull}},
// kTextureOp: 14 fields (7 own + 7 sticky)
{{0x5c00f22001200101ull, 0x0000000000000000ull}},
// kBlitOrCopy: 29 fields (22 own + 7 sticky)
{{0x5f70ffe0013c4181ull, 0x0000000000000000ull}},
// kTextureOp: 17 fields (10 own + 7 sticky)
{{0x5c40f22001300181ull, 0x0000000000000000ull}},
// kReadback: 24 fields (17 own + 7 sticky)
{{0x5f50f3a041300541ull, 0x0000000000000000ull}},
// kXfbSpan: 15 fields (8 own + 7 sticky)