shader: preserve per-lane VCC across a vertex-stage control-flow join #2906

Closed
opened 2026-11-26 18:46:40 +00:00 by R0Y00 · 3 comments
R0Y00 commented 2026-11-26 18:46:40 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T18:46:40Z.


Part of #870 and #2618. Target branch cpp-migration.

Claim. Open to a shader contributor. Comment here with your environment and the part you want to test before starting. Link your PR to this issue and target cpp-migration.

Deliverable. Add a source-built native gfx1013 VS whose per-invocation comparison writes VCC before a two-arm control-flow join. Consume the surviving mask with a conditional select after the join. Run both branch outcomes through the actual translated VS and a simple linked PS. Give the vertices distinct inputs so the expected output includes both VCC values, and retain distinguishable values from both arms. Compare the fenced output with a per-vertex CPU reference.

Negative control. Drop one incoming mask contribution or replace the joined mask with a uniform value. The fixture must detect the changed output. Keep branches that require a whole-wave VCC vote outside this slice.

Reproduction. Start with cmake --build --preset dev --target compile_dxil offscreen_check. Run the existing interface smoke with ctest --preset dev --no-tests=error -R '^native_graphics_interface_library$' -V. Register the new draw under native_graphics_vertex_vcc_join with adapter variants and run ctest --preset dev --no-tests=error -R '^native_graphics_vertex_vcc_join_(warp|hardware)$' -V. Report the revision, adapter, driver and debug-layer status. Record capability skips separately.

Use source-built shader containers and synthetic inputs. Keep the issue and its logs title-neutral.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6633120263 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2906). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-26T18:46:40Z. --- Part of #870 and #2618. Target branch `cpp-migration`. **Claim.** Open to a shader contributor. Comment here with your environment and the part you want to test before starting. Link your PR to this issue and target `cpp-migration`. **Deliverable.** Add a source-built native gfx1013 VS whose per-invocation comparison writes VCC before a two-arm control-flow join. Consume the surviving mask with a conditional select after the join. Run both branch outcomes through the actual translated VS and a simple linked PS. Give the vertices distinct inputs so the expected output includes both VCC values, and retain distinguishable values from both arms. Compare the fenced output with a per-vertex CPU reference. **Negative control.** Drop one incoming mask contribution or replace the joined mask with a uniform value. The fixture must detect the changed output. Keep branches that require a whole-wave VCC vote outside this slice. **Reproduction.** Start with `cmake --build --preset dev --target compile_dxil offscreen_check`. Run the existing interface smoke with `ctest --preset dev --no-tests=error -R '^native_graphics_interface_library$' -V`. Register the new draw under `native_graphics_vertex_vcc_join` with adapter variants and run `ctest --preset dev --no-tests=error -R '^native_graphics_vertex_vcc_join_(warp|hardware)$' -V`. Report the revision, adapter, driver and debug-layer status. Record capability skips separately. Use source-built shader containers and synthetic inputs. Keep the issue and its logs title-neutral.
tedin7 commented 2026-11-26 19:09:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T19:09:58Z.


Releasing this claim: we are focusing on #2908, so this one is open for anyone who wants it.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7201265007 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2906#issuecomment-7201265007). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-26T19:09:58Z. --- Releasing this claim: we are focusing on #2908, so this one is open for anyone who wants it.
Not-Saii commented 2026-11-26 19:20:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-26T19:20:35Z.


Claiming this.

Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.

Part I will test: a source-built gfx1013 VS where a per-vertex compare writes VCC ahead of a two-arm join and a CNDMASK consumes it after the join, drawn through the translated VS with a linked PS under native_graphics_vertex_vcc_join_{warp,hardware}, against a per-vertex CPU reference. Negative control: dropping one incoming mask contribution / forcing a uniform joined mask. Whole-wave VCC votes stay out of scope. PR will target cpp-migration.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7201478378 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2906#issuecomment-7201478378). Originally posted by [Not-Saii](https://github.com/Not-Saii) on 2026-11-26T19:20:35Z. --- Claiming this. Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP. Part I will test: a source-built gfx1013 VS where a per-vertex compare writes VCC ahead of a two-arm join and a CNDMASK consumes it after the join, drawn through the translated VS with a linked PS under `native_graphics_vertex_vcc_join_{warp,hardware}`, against a per-vertex CPU reference. Negative control: dropping one incoming mask contribution / forcing a uniform joined mask. Whole-wave VCC votes stay out of scope. PR will target `cpp-migration`.
MasterDomino commented 2026-11-26 21:38:31 +00:00 (Migrated from github.com)
Author
Contributor

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


Closing: delivered by #2914 (@Not-Saii), squash-merged into cpp-migration as cd752a8c. It referenced this issue with Refs, and merges outside the default branch do not close issues anyway.

How it covers the deliverable:

  • a source-built gfx1013 VS whose per-vertex compare writes VCC before a two-arm join, with a CNDMASK consuming the mask after the join;
  • both branch outcomes drawn through the translated VS with a linked PS;
  • per-vertex values that carry both VCC values and distinguishable arm constants;
  • a per-vertex CPU reference and bit-exact readback;
  • both negative controls: a dropped arm-B mask contribution, and a uniform mask after the join;
  • registration as native_graphics_vertex_vcc_join_{warp,hardware}.

Results:

  • WARP and RTX 4090 passed, with the debug layer on (Not-Saii).
  • WARP passed here with output identical line for line.
  • On an RX 9070 XT the hardware variant crashes in offscreen_check (0xC0000005). That crash is tracked in #2915 and is not specific to this fixture.

Out of scope as before: whole-wave VCC votes, and a translated guest PS in place of the desktop HLSL readback PS. Open a follow-up if that is wanted.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7203921610 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/2906#issuecomment-7203921610). Originally posted by [MasterDomino](https://github.com/MasterDomino) on 2026-11-26T21:38:31Z. --- Closing: delivered by #2914 (@Not-Saii), squash-merged into `cpp-migration` as `cd752a8c`. It referenced this issue with `Refs`, and merges outside the default branch do not close issues anyway. How it covers the deliverable: - a source-built gfx1013 VS whose per-vertex compare writes VCC before a two-arm join, with a CNDMASK consuming the mask after the join; - both branch outcomes drawn through the translated VS with a linked PS; - per-vertex values that carry both VCC values and distinguishable arm constants; - a per-vertex CPU reference and bit-exact readback; - both negative controls: a dropped arm-B mask contribution, and a uniform mask after the join; - registration as `native_graphics_vertex_vcc_join_{warp,hardware}`. Results: - WARP and RTX 4090 passed, with the debug layer on (Not-Saii). - WARP passed here with output identical line for line. - On an RX 9070 XT the hardware variant crashes in `offscreen_check` (`0xC0000005`). That crash is tracked in #2915 and is not specific to this fixture. Out of scope as before: whole-wave VCC votes, and a translated guest PS in place of the desktop HLSL readback PS. Open a follow-up if that is wanted. AI-assisted.
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#2906
No description provided.