upleb.uk

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

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorundeadhuman37 <343031842+undeadhuman37@users.noreply.github.com>2026-11-22 21:59:29 +0300
committerundeadhuman37 <343031842+undeadhuman37@users.noreply.github.com>2026-11-22 23:17:58 +0300
commit0808dfa96ee4d98f4ea3a3b4e7ec061dfbd558ce (patch)
treef1be84df7049e4826737ff961123c9af70ef3e44 /scripts
parentf847748cc76bd3777f9c070c4034eb2fc1c04e64 (diff)
Tests for SHADER-328: constant SGPR offsets in SMEM loads, CPU and GPU
The 64-bit fold itself landed with #1948. This adds what #1938 still carries: two semantic tests (a constant sOFF of -4 is out of bounds, not a 32-bit wrap; a constant sOFF of 2^20 is not sign-extended) and the GPU fixture cs_smem_sconst_off. Its run-time sOFF is now in range (4): an out-of-range run-time sOFF made llvmpipe do the guarded load and segfault (review on Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/run_gpu_tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index 7cd0e9dbf..39e0948ea 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -832,7 +832,7 @@ def run_suite(a, work: str) -> int:
832 ok = None if isinstance(problem, Skip) else not problem 832 ok = None if isinstance(problem, Skip) else not problem
833 results.append((name, ok, problem or f"4096 pixels in each of {len(GET_LOD_TESTS[name])} draw(s): the " 833 results.append((name, ok, problem or f"4096 pixels in each of {len(GET_LOD_TESTS[name])} draw(s): the "
834 "clamped and the calculated LOD within 1/16")) 834 "clamped and the calculated LOD within 1/16"))
835 elif name in ("cs_bounds", "cs_smem_bounds", "cs_smem_stride_align", "cs_smem_sload_neg", "cs_buf_tail", "cs_oob_select", "cs_oob_tail", 835 elif name in ("cs_bounds", "cs_smem_bounds", "cs_smem_stride_align", "cs_smem_sload_neg", "cs_smem_sconst_off", "cs_buf_tail", "cs_oob_select", "cs_oob_tail",
836 "cs_buf_swizzle", "cs_cmpx_class_f32", "cs_cvt_pk_u8", "cs_buf_load_sub", "cs_buf_fmt8"): 836 "cs_buf_swizzle", "cs_cmpx_class_f32", "cs_cvt_pk_u8", "cs_buf_load_sub", "cs_buf_fmt8"):
837 # num_records bounds check (cs_bounds.asm): the out-of-bounds store is dropped and the out-of-bounds 837 # num_records bounds check (cs_bounds.asm): the out-of-bounds store is dropped and the out-of-bounds
838 # load reads 0, so thread 0's four output words are fixed. One thread, no wave64 requirement. 838 # load reads 0, so thread 0's four output words are fixed. One thread, no wave64 requirement.
@@ -847,6 +847,8 @@ def run_suite(a, work: str) -> int:
847 # never run with a translator that zero-extends the s_load immediate (reads 4 GiB past the heap) 847 # never run with a translator that zero-extends the s_load immediate (reads 4 GiB past the heap)
848 "cs_smem_sload_neg": [0x5EED0004, 0x5EED0000, 0x5EED0004, 0x5EED0004, 0x5EED0008, 0x5EED000C, 848 "cs_smem_sload_neg": [0x5EED0004, 0x5EED0000, 0x5EED0004, 0x5EED0004, 0x5EED0008, 0x5EED000C,
849 0xEEEEEEEE, 0xEEEEEEEE], 849 0xEEEEEEEE, 0xEEEEEEEE],
850 # SHADER-328: a constant SGPR offset gives what the run-time one gives (no 32-bit wrap)
851 "cs_smem_sconst_off": [0, 0x5EED0018, 0x5EED0018, 0x5EED0014],
850 "cs_buf_tail": [0, 0x5EED000C, 0x5EED0008, 0x5EED000C, 0, 0, 0x5EED0010, 0], 852 "cs_buf_tail": [0, 0x5EED000C, 0x5EED0008, 0x5EED000C, 0, 0, 0x5EED0010, 0],
851 "cs_oob_select": [0x5EED000C, 0, 0x5EED0014, 0, 0x5EED0018, 0xEEEEEEEE, 0, 0], 853 "cs_oob_select": [0x5EED000C, 0, 0x5EED0014, 0, 0x5EED0018, 0xEEEEEEEE, 0, 0],
852 "cs_oob_tail": [0, 0, 0x5EED0010, 0, 0xBEEF0000, 0xEEEEEEEE, 0, 0x5EED0010], 854 "cs_oob_tail": [0, 0, 0x5EED0010, 0, 0xBEEF0000, 0xEEEEEEEE, 0, 0x5EED0010],