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

Closed
opened 2026-11-27 01:28:34 +00:00 by github-bot · 3 comments
Owner

@⁠R0Y00 on GitHub · 2026-11-26 18:46 UTC · original

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.

**@⁠R0Y00** on GitHub · 2026-11-26 18:46 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/2906) 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.
github-bot 2026-11-27 01:28:34 +00:00
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:28:35 +00:00
Author
Owner

@⁠tedin7 on GitHub · 2026-11-26 19:09 UTC · original · edited 2026-11-26 19:15 UTC

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

**@⁠tedin7** on GitHub · 2026-11-26 19:09 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/2906#issuecomment-7201265007) · edited 2026-11-26 19:15 UTC Releasing this claim: we are focusing on #2908, so this one is open for anyone who wants it.
Author
Owner

@⁠Not-Saii on GitHub · 2026-11-26 19:20 UTC · original

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.

**@⁠Not-Saii** on GitHub · 2026-11-26 19:20 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/2906#issuecomment-7201478378) 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`.
Author
Owner

@⁠MasterDomino on GitHub · 2026-11-26 21:38 UTC · original

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.

**@⁠MasterDomino** on GitHub · 2026-11-26 21:38 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/2906#issuecomment-7203921610) 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.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#2906
No description provided.