Use wave64 graphics tiers on fixed 32-wide devices (RT-WAVE64-GRAPHICS-TIER) #1008

Manually merged
github merged 2 commits from gh-pr/1008/head into gh-pr/1008/base 2026-11-26 09:33:19 +00:00
Owner

@⁠sodove on GitHub · 2026-11-24 16:47 UTC · original
sodove:runtime/wave64-graphics-tier → main · +27 −0 · 1 files · 2 commits · merged 2026-11-25 02:59 UTC

Claimed in #14 as RT-WAVE64-GRAPHICS-TIER.

What and why

On a fixed 32-lane device, the runtime warned about every native wave64 graphics shader, including shaders the translator had classified as safe to run in two halves. The shader library now reads wave64_graphics. For tier A or B on a vertex, pixel or geometry stage, the subgroup decision records graphics_halves with no required size or flags. A native width of 64 still takes precedence where available. Tier C and older or unrecognized metadata keep the width warning.

This changes the per-stage decision and diagnostic. The runtime already submitted the pipeline in all three cases. The translator and generated modules are unchanged.

Tested

  • Native Windows, MSVC RelWithDebInfo. shader_library, subgroup_size and d3d12_draw passed. The index-to-decision regression failed on the base revision before the fix.
  • Drew the hand-written A, B and C pixel fixtures through the runtime's D3D12 graphics PSOs on an RTX 5070 Ti (reported subgroup range 32–32). Recorded outcomes were graphics_halves, graphics_halves, and unavailable. Only C warned. All three draws completed without requesting a subgroup size.
  • A and B each matched the expected four words at all 4,096 pixels. C produced lane IDs 0–31 and matched the fixed-32 expectation at all 4,096 pixels. The standalone harness also passed A/B and skipped the 64-vs-32 comparison for C. Native wave64 was covered by synthetic device properties only.
  • Translator semantic suite on Windows: 6,165 tests across 470 files, zero failing files. The repository's game-data check passed for all four changed files.

GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 610.74, Windows 11 build 26100.7623.

AI-assisted: yes, OpenAI Codex.

**@⁠sodove** on GitHub · 2026-11-24 16:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1008) `sodove:runtime/wave64-graphics-tier` → `main` · +27 −0 · 1 files · 2 commits · merged 2026-11-25 02:59 UTC Claimed in [#14](https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) as `RT-WAVE64-GRAPHICS-TIER`. ### What and why On a fixed 32-lane device, the runtime warned about every native wave64 graphics shader, including shaders the translator had classified as safe to run in two halves. The shader library now reads `wave64_graphics`. For tier A or B on a vertex, pixel or geometry stage, the subgroup decision records `graphics_halves` with no required size or flags. A native width of 64 still takes precedence where available. Tier C and older or unrecognized metadata keep the width warning. This changes the per-stage decision and diagnostic. The runtime already submitted the pipeline in all three cases. The translator and generated modules are unchanged. ### Tested - Native Windows, MSVC RelWithDebInfo. `shader_library`, `subgroup_size` and `d3d12_draw` passed. The index-to-decision regression failed on the base revision before the fix. - Drew the hand-written A, B and C pixel fixtures through the runtime's D3D12 graphics PSOs on an RTX 5070 Ti (reported subgroup range 32–32). Recorded outcomes were `graphics_halves`, `graphics_halves`, and `unavailable`. Only C warned. All three draws completed without requesting a subgroup size. - A and B each matched the expected four words at all 4,096 pixels. C produced lane IDs 0–31 and matched the fixed-32 expectation at all 4,096 pixels. The standalone harness also passed A/B and skipped the 64-vs-32 comparison for C. Native wave64 was covered by synthetic device properties only. - Translator semantic suite on Windows: 6,165 tests across 470 files, zero failing files. The repository's game-data check passed for all four changed files. GPUs tested: NVIDIA GeForce RTX 5070 Ti, driver 610.74, Windows 11 build 26100.7623. AI-assisted: yes, OpenAI Codex.
main (273b3bdf9, from #984) already reads index.json `wave64_graphics`
(ShaderEntry::wave64_graphics), decides tier A/B wave64 VS/PS/GS with
graphics_partition_invariant() in subgroup_size.h, and replaces the
width warning for them with a line saying the device's size is exact
(report_subgroup_unavailable), documented in docs/d3d12_vulkan.md. That
is this pull request's change in another form, so main's form stays.

- docs/d3d12_vulkan.md (conflict, subgroup size section): main's text
  kept; it already describes the tier A/B case.
- runtime/src/shader_library.h, runtime/src/subgroup_size.h: main's
  form kept; the pull request's wave64_graphics_halves field and
  graphics_halves outcome dropped as duplicates of
  ShaderEntry::wave64_graphics and graphics_partition_invariant().
- runtime/test/subgroup_size_test.cpp: the pull request's index.json
  block kept and moved to main's API: the tier is read through
  ShaderLibrary, A and B are partition invariant, C, an unknown tier and
  a non-string are not, and the size decision is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:33:18 +00:00
github manually merged commit 40b393aeaf into gh-pr/1008/base 2026-11-26 09:33:19 +00:00
Author
Owner

@⁠Snooozs on GitHub · 2026-11-24 21:52 UTC · original

Read the whole diff and tested acef4fa6b merged on main 4a50cafc7 (clean): Windows 10 Pro 19045, VS 2022 RelWithDebInfo.

  • subgroup_size_test 3 of 3 runs pass, shader_library_test 2 of 2 (CPU). Against main's headers the test doesn't compile (graphics_halves is new), so I have no red run beyond that.
  • d3d12_draw_test, LEONIDA_VK_VALIDATION=1: passes on an RTX 5060 Ti (NVIDIA 621.01, subgroup range 32..32), 0 VUID lines. On the Ryzen 7 7700 iGPU (AMD 31.0.22044.1) it fails as on main.

The new branch comes after the required-size and default-size ones and needs min = max = 32, so a device that can give 64 keeps its path. I didn't repeat your A/B/C draws. Nothing to change from my side.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠Snooozs** on GitHub · 2026-11-24 21:52 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1008#issuecomment-7145492475) Read the whole diff and tested `acef4fa6b` merged on main `4a50cafc7` (clean): Windows 10 Pro 19045, VS 2022 RelWithDebInfo. - `subgroup_size_test` 3 of 3 runs pass, `shader_library_test` 2 of 2 (CPU). Against main's headers the test doesn't compile (`graphics_halves` is new), so I have no red run beyond that. - `d3d12_draw_test`, `LEONIDA_VK_VALIDATION=1`: passes on an RTX 5060 Ti (NVIDIA 621.01, subgroup range 32..32), 0 VUID lines. On the Ryzen 7 7700 iGPU (AMD 31.0.22044.1) it fails as on main. The new branch comes after the required-size and default-size ones and needs min = max = 32, so a device that can give 64 keeps its path. I didn't repeat your A/B/C draws. Nothing to change from my side. AI-assisted (Claude Code, Claude Opus 5.5).
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 02:59 UTC · original

Merged. Thanks: main already had the rule through #984, so what lands from here is your test.

  • Claim: RT-WAVE64-GRAPHICS-TIER, valid, before this PR.
  • Already in main: graphics_partition_invariant() in subgroup_size.h is the same tier A/B test, and report_subgroup_unavailable reports those shaders as exact instead of warning. The merge keeps main's form; the graphics_halves outcome would have been a second name for it.
  • Kept from this PR: the index.json test block in subgroup_size_test.cpp, moved to main's API, so the tier is now checked through ShaderLibrary (A and B invariant; C, an unknown tier and a non-string not; the size decision unchanged). That is the whole change against main: 27 lines of test.
  • Windows suite under Wine (llvmpipe and an RDNA2 iGPU): subgroup_size and shader_library pass on both; nothing goes from pass to fail against main.
  • Checked on main f78385646 + 40b393aea: it merges cleanly; the 14 docs and writer tests pass; check_no_game_data.py is clean on the 1 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 02:59 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1008#issuecomment-7151478228) Merged. Thanks: `main` already had the rule through #984, so what lands from here is your test. - **Claim:** `RT-WAVE64-GRAPHICS-TIER`, valid, before this PR. - **Already in `main`:** `graphics_partition_invariant()` in `subgroup_size.h` is the same tier A/B test, and `report_subgroup_unavailable` reports those shaders as exact instead of warning. The merge keeps `main`'s form; the `graphics_halves` outcome would have been a second name for it. - **Kept from this PR:** the `index.json` test block in `subgroup_size_test.cpp`, moved to `main`'s API, so the tier is now checked through `ShaderLibrary` (A and B invariant; C, an unknown tier and a non-string not; the size decision unchanged). That is the whole change against `main`: 27 lines of test. - **Windows suite under Wine (llvmpipe and an RDNA2 iGPU):** `subgroup_size` and `shader_library` pass on both; nothing goes from pass to fail against `main`. - **Checked on `main` `f78385646` + `40b393aea`:** it merges cleanly; the 14 docs and writer tests pass; `check_no_game_data.py` is clean on the 1 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.