# 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 #1285
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Reference
No Branch/Tag specified
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy#1285
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?
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.Reproduced on an Intel iGPU (Mesa ANV), so this is not specific to RDNA1 / AMD's Windows driver.
Machine: Intel Meteor Lake iGPU, Mesa 26.2.6, Linux CachyOS, Wine 11.22, 30 GB RAM.
make_game.py --stages check,shadersauto-selected both fallbacks:and the stage ended with
26296 of the 26503 carved shaders(207 short), the same class as here.One thing worth separating: the completeness check aborts the stage before
fspx_shaders,bvh_shaders,library_shadersandexe_shaders, and those four do not depend on the 207 pixel shaders.With the check changed to warn and continue (local patch to
make_game.py), the same shader workspace gives:fspx(amd_fidelityfx_upscaler_xbox.dll), 2,683library(shaders.rpf compute), 54bvh,12
exe(needsgame_scarlett_master.exeinside the package folder)29089 translated shaders (2712 fspx, 17 fspx_gfx, 52 bvh, 12 exe)DeserializeComputePipelineStateX): 2,689 failed calls (0x80004005) -> 0DeserializeGraphicsPipelineStateX): 16 refusals -> 0 after translating the library'sgraphics programs into
fspx_gfx(shader_library.py --stages ps,vs,ms;.codein<parent>/fspx/,.dxbcin<parent>/, and<parent>/index.jsonsostage_of()finds the stage)So on a GPU with this issue the independent libraries can still be built while the 207 are sorted out.
Suggestion: run fspx/bvh/library/exe before
verify_translation_completeness, or scope that failure to themain index only.
Not claiming the 207 are fake: a contributor re-ran one complete shard in isolation and got 3313/3313
translated, so not every shard refuses. The count check still aborts the entire stage.
Closing this issue because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the report/contribution! If you believe this issue was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.