upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_aftermath.cpp
diff options
context:
space:
mode:
authorFIocker <4461558+FIocker@users.noreply.github.com>2026-11-23 13:26:21 +0100
committerFIocker <4461558+FIocker@users.noreply.github.com>2026-11-23 13:26:21 +0100
commit56200058eabe7b820b14e29726d2150531081847 (patch)
tree306a8dd0487a994c018f342d93e09180e1dbf886 /runtime/src/vulkan_aftermath.cpp
parent561b65a832218fbb9e6d2effd392a8eef093a3f8 (diff)
rdna2spirv: write the compute thread-group SGPR (TG_SIZE_EN)
RSRC2 bit 10 adds an SGPR after the workgroup ids. The translator refused every compute shader that sets it. None of the 2,689 carved CS does, but 91 compute programs of the pipeline library in shaders.rpf do (docs/shader_library.md), and they read it as s_and_b32 sN, sTG, 0xfc0, mostly followed by v_mbcnt_lo_u32_b32. The prologue now writes it: waves in the group in [5:0], this wave's index in [11:6], 0 above. That is the GFX6-10 layout Mesa reads (ac_nir_lower_intrinsics_to_args.c: load_num_subgroups = tg_size[5:0], load_subgroup_id = tg_size[11:6], wave64 local invocation index = mbcnt(~0, tg_size & 0xfc0)). Thread i is in wave i / W, as for s_get_waveid_in_workgroup. Not measured on hardware. tests/semantic/test_cs_tg_size.py runs it on the CPU (local index through the 0xfc0 field in wave32 and wave64, 1-D and 3-D groups, the wave count with a partial wave, the whole value, the register after three workgroup ids). The two tests that pinned the refusal now check that it translates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/vulkan_aftermath.cpp')
0 files changed, 0 insertions, 0 deletions