Skip to content

Preserve wave32 for library graphics with matching source metadata - #8993

Draft
hah346 wants to merge 1 commit into
ItsNotRexed:mainfrom
hah346:library-graphics-wave32
Draft

hah346 wants to merge 1 commit into
ItsNotRexed:mainfrom
hah346:library-graphics-wave32

Conversation

@hah346

@hah346 hah346 commented Nov 23, 2026 •

Copy link
Copy Markdown

Claim: #8868 (comment).

The library's bare graphics programs lack the wave-size flag available in regular FSSM and FSPX compute dispatch state. For a VS or PS with a native code sidecar and a 32-bit EXEC marker, use the source container's unanimous wave32 flag to disambiguate s_bfm_b64 used as scalar data. Any other strict wave64 marker, conflicting source payloads, or unavailable source metadata leaves the existing choice in place. The FSSM and FSPX dispatch checks keep precedence.

Validation on Windows x64, SPIRV-Tools 2026.4:

  • All eight cases in test_fspx_wave_size.py passed, including source wave32, wave64, mixed and absent payloads.
  • The 216 selected rejected library programs with a vcc_hi compare all had wave32 source headers. The local baseline rejected all of them, and rdna2spirv, lane_masks: support null/exec/wave32-vcc_hi compare SDSTs and wave32 vcc_hi masks #8448 alone accepted none. Applied to that same integration, this guarded change recovered 173 pixel shaders that all pass spirv-val.
  • The recovered programs complete another 31 VS/PS catalog records, six of them without a tier C warning for 32-wide GPUs. This targeted corpus check does not measure regressions in previously accepted shaders or retail draws.
  • check_no_game_data.py and git diff --check passed. AI-assisted.

Depends on: #8448. This dependency is required for preserving translation coverage. This branch contains only the wave-size change and its fixtures.

Regression follow-up

Retested 664 previously accepted graphics programs eligible for the new fallback. Applying only this PR caused 20 mask destination refusals: those shaders need the wave32 compare-destination handling in #8448. With #8448 included, all 20 pass spirv-val, so all 664 previous successes are retained. This makes #8448 a merge dependency for preserving coverage.

The 664 programs now use wave32. In the measured VS/PS catalog, 61 records that previously contained a tier C stage no longer have that warning; the six newly completed records without tier C are additional. These are catalog classifications, not draw validation.

@Grimkeh Grimkeh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent Linux CPU review

What changed: preserve wave32 for library graphics with matching source metadata.

Checked: tests/semantic/test_fspx_wave_size.py — 8 passed.

Looks correct; no game files. Touches rdna2spirv.py — rebase risk vs other translator PRs.

@hah346

hah346 commented Nov 23, 2026

Copy link
Copy Markdown
Author

RTX 2060 pipeline follow-up (Windows 11 build 26300, driver 616.64, 32-wide subgroups). The guarded implementation and earlier experimental rule accepted the same 173 previously rejected shaders, with byte-identical SPIR-V for all 173.

The guard plus #8448 completes 31 catalog records. Six distinct real VS+PS pairs have no tier C stage and link by the translator's location metadata. I loaded the actual baseline VS and newly translated PS for each into the local vk_pipeline_check variant. vkCreateGraphicsPipelines succeeded for all six, with no failures or skips.

Pipeline state in the probe uses generic render-target formats and vertex bindings. This exercises the driver and the paired modules. It does not validate draws, game startup, or original slot-57 state. The standalone regression run on the earlier accepted shaders eligible for the new fallback is still in progress. AI-assisted; aggregate counts only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants