[GH-ISSUE #1285] # RX 5700 XT (RDNA1), AMD Windows driver 26.11.2: 207 pixel shaders refused, so the shaders stage fails; "computed I/J pair" has no fallback without VK_KHR_fragment_shader_barycentric #30

Open
opened 2026-11-26 20:14:03 +01:00 by 4ld0 · 0 comments
Owner

Originally created by @camsay1996 on GitHub (Nov 24, 2026).
Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/1285

Summary

On a GPU without VK_KHR_fragment_shader_barycentric (Radeon RX 5700 XT, AMD proprietary Windows driver), make_game.py switches on --f16-interp-fallback by itself. The translator then refuses 207 of the 26,503 carved shaders, and the shaders stage ends with an error, so pipelines never runs. The refused shaders are pixel shaders that compute their own I/J barycentric pair. --bary-fallback does not rescue them either: it refuses the same class with a different message.

The same class shows up in the GPU tests: ps_ij_computed is refused and skipped on this card.

Mesh shaders as compute (--mesh-compute) and ps_bary through the barycentric fallback both work here (details below).

Environment

Repo / commit ubiquitarianism/leonida main at 0b45fdc21 (clean tree apart from untracked local files)
GPU AMD Radeon RX 5700 XT, 8 GB (RDNA1, Navi 10)
Driver AMD proprietary driver 26.11.2, Vulkan API 1.4.315
CPU / RAM AMD Ryzen 5 2600 (6 cores), 16 GB
OS Windows 11 Pro N, version 26H2, build 26300.10075
Game Xbox Series package 1.0.2.1 (--check finds it)
Work folder G:\Leonida-WORK (separate drive from the repo on D:)
Tools <fill in: python --version, llvm-mc version and source, Vulkan SDK version>

Relevant vulkaninfo results:

  • VK_KHR_fragment_shader_barycentric: not listed
  • VK_EXT_mesh_shader: not listed
  • VK_KHR_shader_fma: not listed
  • VK_KHR_maintenance8: present
  • geometryShader = true, shaderInt64 = true
  • maxPushConstantsSize = 256
  • minSubgroupSize = 32, maxSubgroupSize = 64, requiredSubgroupSizeStages: count = 1

Implicit Vulkan layers present on the machine (OBS capture hook, Intel Media SDK hook, GOG Galaxy overlay) were switched off for the GPU test runs with DISABLE_VULKAN_OBS_CAPTURE=1 and VK_LOADER_LAYERS_DISABLE=~implicit~.

What happens in the build

Full default build (shaders, assets and runtime stages in parallel, 3 jobs). shaders.log:

  • shader_carve.py: 26,503 shaders carved
  • fssm_unpack.py: 26,503 FSSM blobs, no problems
  • shader_disasm.py (--mcpu gfx1013): 26,503 clean
  • rdna2spirv.py ... --f16-interp-fallback on 3 shards (about 3 h 33 min):
8835 shaders: 8768 translated, 8768 pass spirv-val
67  computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs
8834 shaders: 8763 translated, 8763 pass spirv-val
71  computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs
8834 shaders: 8765 translated, 8765 pass spirv-val
69  computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs
merged 26296 entries
ERROR: shaders: the translation index holds 26296 of the 26503 carved shaders (207 were refused or failed spirv-val, listed in this stage's output): a port built from it would lack them. Fix the translator for that class and translate again

67 + 71 + 69 = 207. pipelines.log is empty, so that stage never ran.

--f16-interp-fallback was not passed by me: make_game.py lines 2984-2989 at this commit enable it when the runtime's GPU lacks fragmentShaderBarycentric.

Why --bary-fallback does not help

I took 20 of the 207 refused shaders (the ones in the disassembly folder but missing from shaders/spirv/index.json) and translated them with --bary-fallback --f16-interp-fallback --mesh-compute:

20 shaders: 0 translated, 0 pass spirv-val
20  computed I/J pair under --bary-fallback: no PerVertexKHR inputs

This matches the code in tools/rdna2spirv.py (lines 16945-16949 at this commit):

if attrs and BARY_FALLBACK:
    raise Unsupported("computed I/J pair under --bary-fallback: no PerVertexKHR inputs")
if attrs and F16_HALVES:
    raise Unsupported("computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs")

So both fallbacks refuse the class on purpose, and there is no flag combination that translates these shaders on a device without the extension. (Sample size is 20 of 207; they all failed the same way and the shard counts are consistent with the full set.)

GPU test results on this card (scripts/run_gpu_tests.py)

Baseline: 223 / 252 passed, 28 skipped, 1 failed.

Skips that matter:

  • ps_bary, ps_persp_bary, ps_scc_mask32, ps_uniform_branch: no VK_KHR_fragment_shader_barycentric
  • ps_ij_computed: computed I/J pairs need PerVertexKHR inputs: no --bary-fallback / --f16-interp-fallback
  • ms_clip, ms_f16_pack, ms_tri, ms_v5_workgroup, ms_w64x_ballot, ms_wave_info_s3: no VK_EXT_mesh_shader
  • ps_w64x_readlane: this device cannot require a 64-wide fragment subgroup (subgroup 32..64)
  • the rest are "run by" other test programs

Failure:

FAIL  cs_imgstore_cube  exit 1: FAILED vkCreateComputePipelines(dev, VK_NULL_HANDLE, 1, &cpi, nullptr, &pipe) -> -13 (line 381)

(-13 is VK_ERROR_UNKNOWN. <fill in after rerunning: reproducible yes/no>)

With the fallbacks (no wave64 emulation set; native wave64 compute passes):

Run Result
LEONIDA_BARY_FALLBACK=1 LEONIDA_F16_INTERP_FALLBACK=1, --filter ps_bary PASS, 4096/4096 pixels (through ps_bary.bary_gs.spv)
same, --filter ps_ij_computed still refused: computed I/J pair under --bary-fallback: no PerVertexKHR inputs, SKIP
LEONIDA_MESH_COMPUTE=1, --filter ms_ 6/6 pass, including ms_wave_info_s3

ps_persp_bary, ps_uniform_branch and ps_scc_mask32 were not rerun with the fallback.

Other notes from the baseline: cs_fma_fused passes with the default GLSL Fma (8/8 fused exact); cs_signed_zero_nan and cs_w32_salu64 pass; gs_tri passes.

Expected behavior

The README reports all 26,503 shaders translating. On this hardware I would expect one of:

  1. A fallback for computed I/J pairs on devices without the extension. The existing barycentric fallback already draws through a pass-through geometry shader, and geometryShader is available here. Could that stage also supply the per-vertex values the computed pair needs? I don't know whether that is feasible for this class.
  2. The shaders stage continues when the only shaders refused are of this known class on a device that cannot run them: write the index without them, list them, and let pipelines skip them. At the moment one class blocks the whole stage after a 3.5 hour run.

How to reproduce quickly (without a 3.5 hour build)

$env:LEONIDA_BARY_FALLBACK = 1
$env:LEONIDA_F16_INTERP_FALLBACK = 1
python -I scripts/run_gpu_tests.py --filter ps_ij_computed

On a GPU/driver without VK_KHR_fragment_shader_barycentric this gives computed I/J pair under --bary-fallback: no PerVertexKHR inputs and a SKIP.

Attachments

vulkaninfo --summary, the baseline GPU test output, and the rdna2spirv.py lines from shaders.log (excerpts only). No game files, extracted assets or generated shaders are attached.

Originally created by @camsay1996 on GitHub (Nov 24, 2026). Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/1285 ## Summary On a GPU without `VK_KHR_fragment_shader_barycentric` (Radeon RX 5700 XT, AMD proprietary Windows driver), `make_game.py` switches on `--f16-interp-fallback` by itself. The translator then refuses 207 of the 26,503 carved shaders, and the `shaders` stage ends with an error, so `pipelines` never runs. The refused shaders are pixel shaders that compute their own I/J barycentric pair. `--bary-fallback` does not rescue them either: it refuses the same class with a different message. The same class shows up in the GPU tests: `ps_ij_computed` is refused and skipped on this card. Mesh shaders as compute (`--mesh-compute`) and `ps_bary` through the barycentric fallback both work here (details below). ## Environment | | | |---|---| | Repo / commit | ubiquitarianism/leonida `main` at `0b45fdc21` (clean tree apart from untracked local files) | | GPU | AMD Radeon RX 5700 XT, 8 GB (RDNA1, Navi 10) | | Driver | AMD proprietary driver 26.11.2, Vulkan API 1.4.315 | | CPU / RAM | AMD Ryzen 5 2600 (6 cores), 16 GB | | OS | Windows 11 Pro N, version 26H2, build 26300.10075 | | Game | Xbox Series package 1.0.2.1 (`--check` finds it) | | Work folder | `G:\Leonida-WORK` (separate drive from the repo on D:) | | Tools | `<fill in: python --version, llvm-mc version and source, Vulkan SDK version>` | Relevant `vulkaninfo` results: - `VK_KHR_fragment_shader_barycentric`: **not listed** - `VK_EXT_mesh_shader`: **not listed** - `VK_KHR_shader_fma`: not listed - `VK_KHR_maintenance8`: present - `geometryShader` = true, `shaderInt64` = true - `maxPushConstantsSize` = 256 - `minSubgroupSize` = 32, `maxSubgroupSize` = 64, `requiredSubgroupSizeStages: count = 1` Implicit Vulkan layers present on the machine (OBS capture hook, Intel Media SDK hook, GOG Galaxy overlay) were switched off for the GPU test runs with `DISABLE_VULKAN_OBS_CAPTURE=1` and `VK_LOADER_LAYERS_DISABLE=~implicit~`. ## What happens in the build Full default build (shaders, assets and runtime stages in parallel, 3 jobs). `shaders.log`: - `shader_carve.py`: 26,503 shaders carved - `fssm_unpack.py`: 26,503 FSSM blobs, no problems - `shader_disasm.py` (`--mcpu gfx1013`): 26,503 clean - `rdna2spirv.py ... --f16-interp-fallback` on 3 shards (about 3 h 33 min): ``` 8835 shaders: 8768 translated, 8768 pass spirv-val 67 computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs 8834 shaders: 8763 translated, 8763 pass spirv-val 71 computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs 8834 shaders: 8765 translated, 8765 pass spirv-val 69 computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs merged 26296 entries ERROR: shaders: the translation index holds 26296 of the 26503 carved shaders (207 were refused or failed spirv-val, listed in this stage's output): a port built from it would lack them. Fix the translator for that class and translate again ``` 67 + 71 + 69 = 207. `pipelines.log` is empty, so that stage never ran. `--f16-interp-fallback` was not passed by me: `make_game.py` lines 2984-2989 at this commit enable it when the runtime's GPU lacks `fragmentShaderBarycentric`. ## Why --bary-fallback does not help I took 20 of the 207 refused shaders (the ones in the disassembly folder but missing from `shaders/spirv/index.json`) and translated them with `--bary-fallback --f16-interp-fallback --mesh-compute`: ``` 20 shaders: 0 translated, 0 pass spirv-val 20 computed I/J pair under --bary-fallback: no PerVertexKHR inputs ``` This matches the code in `tools/rdna2spirv.py` (lines 16945-16949 at this commit): ```python if attrs and BARY_FALLBACK: raise Unsupported("computed I/J pair under --bary-fallback: no PerVertexKHR inputs") if attrs and F16_HALVES: raise Unsupported("computed I/J pair under --f16-interp-fallback: no PerVertexKHR inputs") ``` So both fallbacks refuse the class on purpose, and there is no flag combination that translates these shaders on a device without the extension. (Sample size is 20 of 207; they all failed the same way and the shard counts are consistent with the full set.) ## GPU test results on this card (`scripts/run_gpu_tests.py`) Baseline: **223 / 252 passed, 28 skipped, 1 failed.** Skips that matter: - `ps_bary`, `ps_persp_bary`, `ps_scc_mask32`, `ps_uniform_branch`: no `VK_KHR_fragment_shader_barycentric` - `ps_ij_computed`: `computed I/J pairs need PerVertexKHR inputs: no --bary-fallback / --f16-interp-fallback` - `ms_clip`, `ms_f16_pack`, `ms_tri`, `ms_v5_workgroup`, `ms_w64x_ballot`, `ms_wave_info_s3`: no `VK_EXT_mesh_shader` - `ps_w64x_readlane`: this device cannot require a 64-wide fragment subgroup (subgroup 32..64) - the rest are "run by" other test programs Failure: ``` FAIL cs_imgstore_cube exit 1: FAILED vkCreateComputePipelines(dev, VK_NULL_HANDLE, 1, &cpi, nullptr, &pipe) -> -13 (line 381) ``` (-13 is `VK_ERROR_UNKNOWN`. `<fill in after rerunning: reproducible yes/no>`) With the fallbacks (no wave64 emulation set; native wave64 compute passes): | Run | Result | |---|---| | `LEONIDA_BARY_FALLBACK=1 LEONIDA_F16_INTERP_FALLBACK=1`, `--filter ps_bary` | **PASS**, 4096/4096 pixels (through `ps_bary.bary_gs.spv`) | | same, `--filter ps_ij_computed` | still refused: `computed I/J pair under --bary-fallback: no PerVertexKHR inputs`, SKIP | | `LEONIDA_MESH_COMPUTE=1`, `--filter ms_` | **6/6 pass**, including `ms_wave_info_s3` | `ps_persp_bary`, `ps_uniform_branch` and `ps_scc_mask32` were not rerun with the fallback. Other notes from the baseline: `cs_fma_fused` passes with the default GLSL `Fma` (8/8 fused exact); `cs_signed_zero_nan` and `cs_w32_salu64` pass; `gs_tri` passes. ## Expected behavior The README reports all 26,503 shaders translating. On this hardware I would expect one of: 1. A fallback for computed I/J pairs on devices without the extension. The existing barycentric fallback already draws through a pass-through geometry shader, and `geometryShader` is available here. Could that stage also supply the per-vertex values the computed pair needs? I don't know whether that is feasible for this class. 2. The `shaders` stage continues when the only shaders refused are of this known class on a device that cannot run them: write the index without them, list them, and let `pipelines` skip them. At the moment one class blocks the whole stage after a 3.5 hour run. ## How to reproduce quickly (without a 3.5 hour build) ```powershell $env:LEONIDA_BARY_FALLBACK = 1 $env:LEONIDA_F16_INTERP_FALLBACK = 1 python -I scripts/run_gpu_tests.py --filter ps_ij_computed ``` On a GPU/driver without `VK_KHR_fragment_shader_barycentric` this gives `computed I/J pair under --bary-fallback: no PerVertexKHR inputs` and a SKIP. ## Attachments `vulkaninfo --summary`, the baseline GPU test output, and the `rdna2spirv.py` lines from `shaders.log` (excerpts only). No game files, extracted assets or generated shaders are attached.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#30
No description provided.