Trace the missing raw vertex SRV behind an identity-buffer fallback #2687

Open
opened 2026-11-26 02:20:26 +00:00 by R0Y00 · 4 comments
R0Y00 commented 2026-11-26 02:20:26 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T02:20:26Z.


Refs #870 and #1146.

A local graphics-path measurement on a diagnostic build based on a6c8d80d found a non-indexed 6,468-vertex draw whose VS reads one 32-byte record per six vertex IDs. The active root table's first four descriptor words contained a small nonzero word followed by three zeros. The direct buffer resolver obtained a zero-length range. The render launcher's identity fallback supplied 256 bytes, confirmed by a GPU copy. Stream output contained 48 finite positions outside the clip volume, followed by 6,420 positions with NaNs in all four components. GPU pipeline statistics counted 2,156 input triangles and zero rasterized primitives. The RGBA16_FLOAT target was zero before and after the draw.

Work requested

  • Trace the last write or copy to the exact bound slot, including heap identity, root-table base, descriptor increment, and the order of binding, recording and execution. Check the descriptor shadow against the guest-visible bytes at those points.
  • Establish what the producer intended the slot to reference. A small first word alone does not establish an index or GPU address. Identify the source resource and byte range if the producer establishes a buffer binding.
  • Add a source-built fixture for the demonstrated producer/bind sequence. Use distinct in-range records on both sides of the first eight, plus an invalid or stale-slot control. Verify the vertex values by GPU readback.
  • Repeat the local capture with the exact range and count the change in finite positions, rasterized primitives and pixel invocations. Report separately whether the affected surface changed.

Public reproductions should use source-built inputs. The measured sequence identifies the failed binding during this draw. Its original writer and the expected scene contribution remain open.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6618094900 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2695). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T02:20:26Z. --- Refs #870 and #1146. A local graphics-path measurement on a diagnostic build based on `a6c8d80d` found a non-indexed 6,468-vertex draw whose VS reads one 32-byte record per six vertex IDs. The active root table's first four descriptor words contained a small nonzero word followed by three zeros. The direct buffer resolver obtained a zero-length range. The render launcher's identity fallback supplied 256 bytes, confirmed by a GPU copy. Stream output contained 48 finite positions outside the clip volume, followed by 6,420 positions with NaNs in all four components. GPU pipeline statistics counted 2,156 input triangles and zero rasterized primitives. The RGBA16_FLOAT target was zero before and after the draw. **Work requested** - Trace the last write or copy to the exact bound slot, including heap identity, root-table base, descriptor increment, and the order of binding, recording and execution. Check the descriptor shadow against the guest-visible bytes at those points. - Establish what the producer intended the slot to reference. A small first word alone does not establish an index or GPU address. Identify the source resource and byte range if the producer establishes a buffer binding. - Add a source-built fixture for the demonstrated producer/bind sequence. Use distinct in-range records on both sides of the first eight, plus an invalid or stale-slot control. Verify the vertex values by GPU readback. - Repeat the local capture with the exact range and count the change in finite positions, rasterized primitives and pixel invocations. Report separately whether the affected surface changed. Public reproductions should use source-built inputs. The measured sequence identifies the failed binding during this draw. Its original writer and the expected scene contribution remain open.
R0Y00 commented 2026-11-26 04:04:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T03:08:55Z.


Two existing source-built fixtures give this task a starting point. On 02ea97ed, WARP and RTX 4060 Laptop passed all four tests selected by:

ctest --preset release --no-tests=error -R '^startup_(address_buffer_srv|frame_copy)_(warp|hardware)$' -V

The address-SRV fixture checks raw base and interior ranges through the table. The frame-copy fixture distinguishes a rewrite between draws from an unchanged source. They exercise a pixel load. For the producer-specific fixture here, keep the same resolved table path, run the load in the vertex shader at byte offsets on both sides of 256, and compare an accepted copied descriptor with a stale or empty source slot. Record the descriptor increment and whether the desktop record and guest bytes agree. The two passing controls do not identify the actual executable's descriptor writer.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181438258 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2695#issuecomment-7181438258). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T03:08:55Z. --- Two existing source-built fixtures give this task a starting point. On 02ea97ed, WARP and RTX 4060 Laptop passed all four tests selected by: ```powershell ctest --preset release --no-tests=error -R '^startup_(address_buffer_srv|frame_copy)_(warp|hardware)$' -V ``` The address-SRV fixture checks raw base and interior ranges through the table. The frame-copy fixture distinguishes a rewrite between draws from an unchanged source. They exercise a pixel load. For the producer-specific fixture here, keep the same resolved table path, run the load in the vertex shader at byte offsets on both sides of 256, and compare an accepted copied descriptor with a stale or empty source slot. Record the descriptor increment and whether the desktop record and guest bytes agree. The two passing controls do not identify the actual executable's descriptor writer.
R0Y00 commented 2026-11-26 04:04:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T03:31:11Z.


The source-built vertex half is in #2720. Both WARP and RTX 4060 Laptop matched all 32 pixels with a full view, a short stale binding, and the restored full view. The fixture checks guest-visible bytes after each copy and uses the reported descriptor increment. The remaining task is identifying the original producer for the observed slot; this fixture supplies the known writer and short-view controls.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7181789856 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2695#issuecomment-7181789856). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T03:31:11Z. --- The source-built vertex half is in #2720. Both WARP and RTX 4060 Laptop matched all 32 pixels with a full view, a short stale binding, and the restored full view. The fixture checks guest-visible bytes after each copy and uses the reported descriptor increment. The remaining task is identifying the original producer for the observed slot; this fixture supplies the known writer and short-view controls.
R0Y00 commented 2026-11-26 06:02:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T05:09:42Z.


#2743 adds a source-built check for two raw vertex SRVs used together in one draw. It compares the copied guest records before the draw, verifies the channel swap and restore, and confirms that intentionally using the first table offset for both bindings collapses the channels in all 32 pixels. WARP and RTX 4060 Laptop passed both arms. With the existing short-view test, this gives a reference for separating a record-copy error from a repeated table offset. The executable still needs the writer of the two observed records traced.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7183235078 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2695#issuecomment-7183235078). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T05:09:42Z. --- #2743 adds a source-built check for two raw vertex SRVs used together in one draw. It compares the copied guest records before the draw, verifies the channel swap and restore, and confirms that intentionally using the first table offset for both bindings collapses the channels in all 32 pixels. WARP and RTX 4060 Laptop passed both arms. With the existing short-view test, this gives a reference for separating a record-copy error from a repeated table offset. The executable still needs the writer of the two observed records traced.
lambirou commented 2026-11-26 11:03:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-26T10:50:05Z.


Producer trace: blocked on reaching the draw, not on the fixture

Current state after #2720 and #2743 (both merged): the resolved-table path, the short stale view, two records in one table, the record copy and the channel swap all have source-built coverage. What they do not identify is who wrote the slot in the executable.

I tried to get the window for that trace with a local reference run (a6c8d80d, revision-14 cache, storage path set, 600 s, details in #870). It reaches 344.7 s and 201,517 translated draws, but the indirect path is never entered:

x2w-render indirect: forwarded 0; refused graphics-pipeline 0; compute-pipeline 0; placeholder-signature 0; other 0
pipelines first looked up by ExecuteIndirect 0

With zero ExecuteIndirect lookups there is no slot-61 draw to instrument, so a "last writer of the slot" trace cannot yet be anchored to the observed 6,468-vertex draw on this host.

Next step that can be done without the maintainer's scene: add opt-in writer tracing to the startup command-list recorder (heap, root-table base, descriptor increment, binding/recording/execution order) and replay the same revision until the draw appears. I do not have that replay locally. If the exact command-list region or a diagnostic build that reaches it exists on your side, I can prepare the tracing patch against it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7189899202 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2695#issuecomment-7189899202). Originally posted by [lambirou](https://github.com/lambirou) on 2026-11-26T10:50:05Z. --- ## Producer trace: blocked on reaching the draw, not on the fixture Current state after #2720 and #2743 (both merged): the resolved-table path, the short stale view, two records in one table, the record copy and the channel swap all have source-built coverage. What they do not identify is who wrote the slot in the executable. I tried to get the window for that trace with a local reference run (`a6c8d80d`, revision-14 cache, storage path set, 600 s, details in #870). It reaches 344.7 s and 201,517 translated draws, but the indirect path is never entered: ```text x2w-render indirect: forwarded 0; refused graphics-pipeline 0; compute-pipeline 0; placeholder-signature 0; other 0 pipelines first looked up by ExecuteIndirect 0 ``` With zero `ExecuteIndirect` lookups there is no slot-61 draw to instrument, so a "last writer of the slot" trace cannot yet be anchored to the observed 6,468-vertex draw on this host. Next step that can be done without the maintainer's scene: add opt-in writer tracing to the startup command-list recorder (heap, root-table base, descriptor increment, binding/recording/execution order) and replay the same revision until the draw appears. I do not have that replay locally. If the exact command-list region or a diagnostic build that reaches it exists on your side, I can prepare the tracing patch against it.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#2687
No description provided.