mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:10:52 +01:00
[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
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.pyswitches on--f16-interp-fallbackby itself. The translator then refuses 207 of the 26,503 carved shaders, and theshadersstage ends with an error, sopipelinesnever runs. The refused shaders are pixel shaders that compute their own I/J barycentric pair.--bary-fallbackdoes not rescue them either: it refuses the same class with a different message.The same class shows up in the GPU tests:
ps_ij_computedis refused and skipped on this card.Mesh shaders as compute (
--mesh-compute) andps_barythrough the barycentric fallback both work here (details below).Environment
mainat0b45fdc21(clean tree apart from untracked local files)--checkfinds it)G:\Leonida-WORK(separate drive from the repo on D:)<fill in: python --version, llvm-mc version and source, Vulkan SDK version>Relevant
vulkaninforesults:VK_KHR_fragment_shader_barycentric: not listedVK_EXT_mesh_shader: not listedVK_KHR_shader_fma: not listedVK_KHR_maintenance8: presentgeometryShader= true,shaderInt64= truemaxPushConstantsSize= 256minSubgroupSize= 32,maxSubgroupSize= 64,requiredSubgroupSizeStages: count = 1Implicit 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=1andVK_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 carvedfssm_unpack.py: 26,503 FSSM blobs, no problemsshader_disasm.py(--mcpu gfx1013): 26,503 cleanrdna2spirv.py ... --f16-interp-fallbackon 3 shards (about 3 h 33 min):67 + 71 + 69 = 207.
pipelines.logis empty, so that stage never ran.--f16-interp-fallbackwas not passed by me:make_game.pylines 2984-2989 at this commit enable it when the runtime's GPU lacksfragmentShaderBarycentric.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:This matches the code in
tools/rdna2spirv.py(lines 16945-16949 at this commit):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: noVK_KHR_fragment_shader_barycentricps_ij_computed:computed I/J pairs need PerVertexKHR inputs: no --bary-fallback / --f16-interp-fallbackms_clip,ms_f16_pack,ms_tri,ms_v5_workgroup,ms_w64x_ballot,ms_wave_info_s3: noVK_EXT_mesh_shaderps_w64x_readlane: this device cannot require a 64-wide fragment subgroup (subgroup 32..64)Failure:
(-13 is
VK_ERROR_UNKNOWN.<fill in after rerunning: reproducible yes/no>)With the fallbacks (no wave64 emulation set; native wave64 compute passes):
LEONIDA_BARY_FALLBACK=1 LEONIDA_F16_INTERP_FALLBACK=1,--filter ps_baryps_bary.bary_gs.spv)--filter ps_ij_computedcomputed I/J pair under --bary-fallback: no PerVertexKHR inputs, SKIPLEONIDA_MESH_COMPUTE=1,--filter ms_ms_wave_info_s3ps_persp_bary,ps_uniform_branchandps_scc_mask32were not rerun with the fallback.Other notes from the baseline:
cs_fma_fusedpasses with the default GLSLFma(8/8 fused exact);cs_signed_zero_nanandcs_w32_salu64pass;gs_tripasses.Expected behavior
The README reports all 26,503 shaders translating. On this hardware I would expect one of:
geometryShaderis 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.shadersstage 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 letpipelinesskip 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)
On a GPU/driver without
VK_KHR_fragment_shader_barycentricthis givescomputed I/J pair under --bary-fallback: no PerVertexKHR inputsand a SKIP.Attachments
vulkaninfo --summary, the baseline GPU test output, and therdna2spirv.pylines fromshaders.log(excerpts only). No game files, extracted assets or generated shaders are attached.