shader: verify mesh and pixel readback after swapping two CBVs #551

Merged
RonLogic merged 2 commits from upstream-pr/557 into main 2026-11-22 12:47:10 +00:00
RonLogic commented 2026-11-22 11:55:12 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-22T11:55:12Z.


Refs #218. This implements the independent descriptor-swap draw requested for mesh-stage work and reuses the mesh readback harness and #544 packed color program.

Two separate constant-buffer resources are bound as b0 and b1 through a shader-visible descriptor table. The translated mesh reads depth from b0 and horizontal translation from b1, while the translated pixel shader reads color from b0. The test keeps the input bytes and compiled shaders fixed and exchanges only the two descriptor slots.

  • Baseline: a red 32×32 target with mesh depth 0.25.
  • Swapped: eight columns of clear pixels, 24 columns of green, and mesh depth 0.75.
  • The old pixel reference fails at all 1,024 pixels with the current mesh trace. The old mesh reference fails the trace check with zero pixel mismatches.

On Windows 11 build 26300.9974, all 10 related mesh draw tests passed on the RTX 4070 (32.0.16.2124) and WARP (10.0.26100.9818). Both positive draws reported zero D3D12 debug warnings or errors on each adapter. The documentation link check passed. The LLVM fixture round-trip is registered for the Linux CI job.

ctest --preset dev --no-tests=error -R "^mesh_(entry_draw|indexed_draw|attribute_draw|pixel_pipeline|descriptor_swap)_(warp|hardware)$" -V

AI-assisted: yes.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6542064807 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/557). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-22T11:55:12Z. --- Refs #218. This implements the independent descriptor-swap draw requested for mesh-stage work and reuses the mesh readback harness and #544 packed color program. Two separate constant-buffer resources are bound as b0 and b1 through a shader-visible descriptor table. The translated mesh reads depth from b0 and horizontal translation from b1, while the translated pixel shader reads color from b0. The test keeps the input bytes and compiled shaders fixed and exchanges only the two descriptor slots. - Baseline: a red 32×32 target with mesh depth 0.25. - Swapped: eight columns of clear pixels, 24 columns of green, and mesh depth 0.75. - The old pixel reference fails at all 1,024 pixels with the current mesh trace. The old mesh reference fails the trace check with zero pixel mismatches. On Windows 11 build 26300.9974, all 10 related mesh draw tests passed on the RTX 4070 (32.0.16.2124) and WARP (10.0.26100.9818). Both positive draws reported zero D3D12 debug warnings or errors on each adapter. The documentation link check passed. The LLVM fixture round-trip is registered for the Linux CI job. `ctest --preset dev --no-tests=error -R "^mesh_(entry_draw|indexed_draw|attribute_draw|pixel_pipeline|descriptor_swap)_(warp|hardware)$" -V` AI-assisted: yes.
upstream-sync closed this pull request 2026-11-24 06:43:40 +00:00
Sign in to join this conversation.
No reviewers
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!551
No description provided.