upleb.uk

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

summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:43:51 -0500
committerItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com>2026-11-22 11:43:51 -0500
commitae21dddaa61da12448e7e50d0f54d7c5fbbefb80 (patch)
treeefdf79fde30440200093370f0f5ae321b29232f5 /runtime
parent2b0a8b6be46d013a176592891aff13b8362b86cd (diff)
parent72d7e52dfa2d076fd8454224f2f30f1ebf9c7409 (diff)
Merge pull request #2290 from 1TrickOmen
Diffstat (limited to 'runtime')
-rw-r--r--runtime/test/shaders/check.py10
-rw-r--r--runtime/test/shaders/cs_mask_vgpr_exec.asm15
2 files changed, 22 insertions, 3 deletions
diff --git a/runtime/test/shaders/check.py b/runtime/test/shaders/check.py
index 61b985de9..bec6947e7 100644
--- a/runtime/test/shaders/check.py
+++ b/runtime/test/shaders/check.py
@@ -83,14 +83,15 @@ SIGNED_ZERO_NAN = [0x80000000, 0x80000000, 0x80008000, 0x00008000, 1, 1, 1, 0x00
83WAVE32_DUMPS = ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", 83WAVE32_DUMPS = ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute",
84 "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", "cs_w32_lds_u8_d16", "cs_bpermute32", 84 "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", "cs_w32_lds_u8_d16", "cs_bpermute32",
85 "cs_w32_partial_scmp", "cs_exec_const", "cs_w32_mask_imm", "cs_w32_int_ext", 85 "cs_w32_partial_scmp", "cs_exec_const", "cs_w32_mask_imm", "cs_w32_int_ext",
86 "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_w32_sincos", "cs_lds_b64_cmpst") 86 "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_w32_sincos", "cs_lds_b64_cmpst",
87 "cs_mask_vgpr_exec")
87# Wave32 lane-mask dumps: their EXEC/VCC masks and lane selects cover 32 lanes, so a device whose widest subgroup is 88# Wave32 lane-mask dumps: their EXEC/VCC masks and lane selects cover 32 lanes, so a device whose widest subgroup is
88# narrower (Mesa llvmpipe: 8) can't produce their words. They are skipped there, as ps_bitmask_perm is. They run with 89# narrower (Mesa llvmpipe: 8) can't produce their words. They are skipped there, as ps_bitmask_perm is. They run with
89# 32 lanes requested (WAVE32_LANE_ENV), as run_gpu_tests.py does: a device with a range like 8..32 (Intel ANV) may 90# 32 lanes requested (WAVE32_LANE_ENV), as run_gpu_tests.py does: a device with a range like 8..32 (Intel ANV) may
90# otherwise pick a narrower size and return different words (#774). 91# otherwise pick a narrower size and return different words (#774).
91WAVE32_LANE_ENV = {"VKC_SUBGROUP_SIZE": "32"} 92WAVE32_LANE_ENV = {"VKC_SUBGROUP_SIZE": "32"}
92WAVE32_LANE_DUMPS = ("cs_wqm_w32", "cs_w32_lane_wrap", "cs_w32_permute", "cs_bpermute32", "cs_w32_partial_scmp", "cs_exec_const", 93WAVE32_LANE_DUMPS = ("cs_wqm_w32", "cs_w32_lane_wrap", "cs_w32_permute", "cs_bpermute32", "cs_w32_partial_scmp", "cs_exec_const",
93 "cs_w32_mask_imm", "cs_lds_b64_cmpst") 94 "cs_w32_mask_imm", "cs_lds_b64_cmpst", "cs_mask_vgpr_exec")
94CS_DPP = [("cs_dpp", [1, 0, 3, 2, 5, 4, 7, 6]), 95CS_DPP = [("cs_dpp", [1, 0, 3, 2, 5, 4, 7, 6]),
95 ("cs_dpp_row", [0, 0, 1, 2, 3, 4, 5, 6]), 96 ("cs_dpp_row", [0, 0, 1, 2, 3, 4, 5, 6]),
96 ("cs_dpp_mask", [1, 0, 3, 2, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee]), 97 ("cs_dpp_mask", [1, 0, 3, 2, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee, 0xeeeeeeee]),
@@ -145,7 +146,10 @@ CS_DUMPS = [*CS_DPP, ("cs_store", CS_STORE), ("cs_smem_soffset_imm", CS_SMEM),
145 # SHADER-91: waves that end without an s_barrier don't hold the barrier of the ones still running 146 # SHADER-91: waves that end without an s_barrier don't hold the barrier of the ones still running
146 ("cs_barrier_early_end", [127, 126, 125, 124, 123, 122, 121, 120]), 147 ("cs_barrier_early_end", [127, 126, 125, 124, 123, 122, 121, 120]),
147 # SHADER-91: a barrier in a loop with a per-wave trip count; the k-th one waits for the waves still running 148 # SHADER-91: a barrier in a loop with a per-wave trip count; the k-th one waits for the waves still running
148 ("cs_barrier_loop", [128, 96, 64, 32, 128, 96, 64, 0xEEEEEEEE])] 149 ("cs_barrier_loop", [128, 96, 64, 32, 128, 96, 64, 0xEEEEEEEE]),
150 # SHADER-21 part 2: a mask copied to a VGPR with v_mov_b32 respects EXEC (inactive lanes keep the old VGPR)
151 ("cs_mask_vgpr_exec", [0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
152 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF, 0xDEADBEEF])]
149# num_records bounds check (cs_bounds.asm): one thread, so no 64-wide subgroup requirement. 153# num_records bounds check (cs_bounds.asm): one thread, so no 64-wide subgroup requirement.
150# The SMEM and raw MUBUF rules measured on an RX 6800 (derivations in each .asm header): one thread too. 154# The SMEM and raw MUBUF rules measured on an RX 6800 (derivations in each .asm header): one thread too.
151# Never run cs_smem_sload_neg with a translator that zero-extends the s_load immediate: it reads 4 GiB past the heap. 155# Never run cs_smem_sload_neg with a translator that zero-extends the s_load immediate: it reads 4 GiB past the heap.
diff --git a/runtime/test/shaders/cs_mask_vgpr_exec.asm b/runtime/test/shaders/cs_mask_vgpr_exec.asm
new file mode 100644
index 000000000..13e0bc0d9
--- /dev/null
+++ b/runtime/test/shaders/cs_mask_vgpr_exec.asm
@@ -0,0 +1,15 @@
1; group: 32,1,1
2; Part-2 test (SHADER-21 follow-up): a lane mask written to a VGPR under partial EXEC.
3; Hardware: inactive lanes keep their old VGPR value.
4; If the translator's write_all_lanes ignores EXEC, inactive lanes get the mask word instead.
5v_mbcnt_lo_u32_b32 v1, -1, 0
6v_mov_b32_e32 v2, 0xdeadbeef
7v_mov_b32_e32 v5, 1
8v_mov_b32_e32 v6, 2
9v_cmp_lt_u32_e64 vcc_lo, v5, v6
10s_mov_b32 exec_lo, 0x0000000f
11v_mov_b32_e32 v2, vcc_lo
12s_mov_b32 exec_lo, -1
13v_lshlrev_b32_e32 v3, 2, v1
14buffer_store_dword v2, v3, s[0:3], 0 offen
15s_endpgm