shader: verify a GPU compute buffer consumed by translated pixels #549

Merged
RonLogic merged 3 commits from upstream-pr/555 into main 2026-11-22 13:00:44 +00:00
RonLogic commented 2026-11-22 11:40:49 +00:00 (Migrated from github.com)

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


Refs #218. This independent GPU test pairs the compute store lowering from #539 with the existing scalar-buffer pixel color fixture. The compute pass writes the color words to a default-heap UAV at byte offset 16. After the transition to constant-buffer state and the dispatch fence, graphics binds that same GPU address as a CBV. The CPU only reads back the final RGBA32F target.

Two source-built producer variants produce different expected colors with the same pixel shader. The CPU reference compares all 4,096 pixels and all channels for each palette. The stale-binding control runs both producers and then deliberately binds the earlier buffer. The first pixel differs on both backends, with (0.25, 0.75) observed where (0.5, 0.125) was expected in red and green.

The shared interfaces are the offscreen_check operation dispatch and pixel fixture readback. The EXE integration stays in the milestone work in #218. This change adds the independent compute-to-graphics data handoff test.

Windows x64 at 109ae9e on 96e836d:

ctest --test-dir out/build/followup --no-tests=error -R '^(compute_to_pixel|compute_store_aot|pixel_aot_buffer_color)_(warp|hardware)$' -V
python -B tests/docs_links_check.py

All six tests passed on RTX 4070 and WARP, and the documentation link check passed.

AI-assisted: yes.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6541938074 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/555). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-22T11:40:49Z. --- Refs #218. This independent GPU test pairs the compute store lowering from #539 with the existing scalar-buffer pixel color fixture. The compute pass writes the color words to a default-heap UAV at byte offset 16. After the transition to constant-buffer state and the dispatch fence, graphics binds that same GPU address as a CBV. The CPU only reads back the final RGBA32F target. Two source-built producer variants produce different expected colors with the same pixel shader. The CPU reference compares all 4,096 pixels and all channels for each palette. The stale-binding control runs both producers and then deliberately binds the earlier buffer. The first pixel differs on both backends, with `(0.25, 0.75)` observed where `(0.5, 0.125)` was expected in red and green. The shared interfaces are the `offscreen_check` operation dispatch and pixel fixture readback. The EXE integration stays in the milestone work in #218. This change adds the independent compute-to-graphics data handoff test. Windows x64 at `109ae9e` on `96e836d`: ```powershell ctest --test-dir out/build/followup --no-tests=error -R '^(compute_to_pixel|compute_store_aot|pixel_aot_buffer_color)_(warp|hardware)$' -V python -B tests/docs_links_check.py ``` All six tests passed on RTX 4070 and WARP, and the documentation link check passed. 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!549
No description provided.