tests: verify formatted buffer loads in slot 57 mesh draws #2568

Merged
RavenCurseBurg merged 2 commits from upstream-pr/2576 into main 2026-11-25 22:10:18 +00:00
RavenCurseBurg commented 2026-11-25 21:35:17 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RavenCurseBurg on 2026-11-25T21:35:17Z.


Part of #2413, T3. The accepted slot 57 mesh shape already lowers a single-component buffer_load_format_x through the shared MUBUF path. This adds a source-built readback for that path and its descriptor dependency. Claim and scope.

The fixture inserts a gfx1013 formatted load after the raw vertex-colour load. The load replaces red, so the other three channels are independent controls. The host test checks the published buffer SRV and its descword3 source, then checks that overwriting descriptor word 3 in the guest program produces the expected refusal.

The new WARP and hardware CTests read the constant locations from the published manifest. They draw the same compiled mesh/pixel pair with the same 512 bytes of input. Changing only descriptor word 3 selects R32_FLOAT X, RGBA8_UNORM X, or RGBA8_UNORM Z. The CPU reference obtains the expected channel directly from the fixture bytes and rasterizes all 1,024 pixels. The existing raw-draw CTest keeps its own time budget. Same-guest-list loading and indirect forwarding are tracked under R1.

Verification

  • After integrating #2566, Windows Server 2025 Release at ee748000 passed the host, existing WARP mesh draw (including the new wave-uniform branch cases), and formatted WARP draw, 3/3 with zero skips. The original f0402dd1 build passed the same three CTests.
  • On Windows 11 build 26100.9711, I verified the source commit and SHA-256 of the ee748000 build, then ran both draw modes on an NVIDIA RTX 4060 (32.0.15.9579) and WARP (10.0.26100.9711) with DXC 1.9.2609. All three formatted descriptors matched all 1,024 pixels on each adapter. Using the wrong format or channel reference changed exactly 259 pixels in each case. Intel UHD 770 (32.0.101.5973) reported an unsupported mesh shader tier and returned skip code 77 for both modes. The local D3D12 debug layer was unavailable.
  • On the RTX, forcing the compiled shader to use R32_FLOAT broke the UNORM-X case at 259 pixels. Forcing selector X broke the UNORM-Z case at 259 pixels.
  • LLVM 15 reassembled the original mesh, formatted mesh, overwritten-descriptor mesh, and paired pixel program to the fixture words. The standalone Python host test, documentation links, bidi check and git diff --check passed.

AI-assisted with Codex (GPT-6.2 Astra, xhigh).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6614218660 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/2576). Originally posted by [RavenCurseBurg](https://github.com/RavenCurseBurg) on 2026-11-25T21:35:17Z. --- Part of #2413, T3. The accepted slot 57 mesh shape already lowers a single-component `buffer_load_format_x` through the shared MUBUF path. This adds a source-built readback for that path and its descriptor dependency. [Claim and scope](https://github.com/R0Y00/Xbox2Windows/issues/2413#issuecomment-7175038871). The fixture inserts a gfx1013 formatted load after the raw vertex-colour load. The load replaces red, so the other three channels are independent controls. The host test checks the published buffer SRV and its `descword3` source, then checks that overwriting descriptor word 3 in the guest program produces the expected refusal. The new WARP and hardware CTests read the constant locations from the published manifest. They draw the same compiled mesh/pixel pair with the same 512 bytes of input. Changing only descriptor word 3 selects R32_FLOAT X, RGBA8_UNORM X, or RGBA8_UNORM Z. The CPU reference obtains the expected channel directly from the fixture bytes and rasterizes all 1,024 pixels. The existing raw-draw CTest keeps its own time budget. Same-guest-list loading and indirect forwarding are tracked under R1. ### Verification - After integrating #2566, [Windows Server 2025 Release at ee748000](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45709110399) passed the host, existing WARP mesh draw (including the new wave-uniform branch cases), and formatted WARP draw, 3/3 with zero skips. The [original f0402dd1 build](https://github.com/RavenCurseBurg/Xbox2Windows/actions/runs/45704958537) passed the same three CTests. - On Windows 11 build 26100.9711, I verified the source commit and SHA-256 of the ee748000 build, then ran both draw modes on an NVIDIA RTX 4060 (32.0.15.9579) and WARP (10.0.26100.9711) with DXC 1.9.2609. All three formatted descriptors matched all 1,024 pixels on each adapter. Using the wrong format or channel reference changed exactly 259 pixels in each case. Intel UHD 770 (32.0.101.5973) reported an unsupported mesh shader tier and returned skip code 77 for both modes. The local D3D12 debug layer was unavailable. - On the RTX, forcing the compiled shader to use R32_FLOAT broke the UNORM-X case at 259 pixels. Forcing selector X broke the UNORM-Z case at 259 pixels. - LLVM 15 reassembled the original mesh, formatted mesh, overwritten-descriptor mesh, and paired pixel program to the fixture words. The standalone Python host test, documentation links, bidi check and `git diff --check` passed. AI-assisted with Codex (GPT-6.2 Astra, xhigh).
upstream-sync closed this pull request 2026-11-25 23:01:50 +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!2568
No description provided.