upleb.uk

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

summaryrefslogtreecommitdiff
path: root/scripts/run_gpu_tests.py
diff options
context:
space:
mode:
authorVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 14:50:01 +0100
committerVonsek <45567075+Vonsek@users.noreply.github.com>2026-11-22 14:50:01 +0100
commitb40d8039a98f57b26bd05860febbabbe59b97873 (patch)
treeb9d695c6eb44fda9c241bdd42295053bb3a549e8 /scripts/run_gpu_tests.py
parent354e129c2029b34f05285d6b100e1fdf02958772 (diff)
parent89b047cd8fab50675a43d76722a6a8a881f55dc2 (diff)
Merge main into test/valu-int-misc (#1492)
Conflicts: tests/semantic/regen_fixtures.py AI-assisted.
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index 6c7b29a7d..a1e98d40a 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -29,8 +29,9 @@ from check import Skip, clip_test, fmt_1010102_test, fmt_xy_xyz_test
29from compute_fixture import compute_header 29from compute_fixture import compute_header
30from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) 30from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test)
31from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, 31from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES,
32 TEXTURE_MIP_TEST, GATHER_LOD_TEST, MIP_TEST_PASSES, GATHER_WRAP, USER_SGPRS_ENV, USER_SGPRS_WORDS, Skip, mesh_v5_test, not_found_message, 32 TEXTURE_MIP_TEST, GATHER_LOD_TEST, MIP_TEST_PASSES, TEXTURE_CONSTANTS, USER_SGPRS_ENV, USER_SGPRS_WORDS, Skip, mesh_v5_test, not_found_message,
33 pick_build_dir, start_failure, texture_gradient_a16_test, texture_mip_test) 33 pick_build_dir, start_failure, texture_gradient_a16_test, texture_mip_test)
34from check import SIGNED_MIP_TEST
34from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py 35from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py
35from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8 36from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8
36from check import gpu_test_timeout, timed_out # per-program time limit (LEONIDA_GPU_TEST_TIMEOUT) 37from check import gpu_test_timeout, timed_out # per-program time limit (LEONIDA_GPU_TEST_TIMEOUT)
@@ -552,10 +553,11 @@ OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_transl
552# Shaders a selected test draws with, built even when the filter leaves them out (#192). 553# Shaders a selected test draws with, built even when the filter leaves them out (#192).
553DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm", 554DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm",
554 "ps_texture_sample_d16": "vs_ids.asm", "ps_sample_c_lz": "vs_ids.asm", "ps_sample_c_lz_a16": "vs_ids.asm", 555 "ps_texture_sample_d16": "vs_ids.asm", "ps_sample_c_lz": "vs_ids.asm", "ps_sample_c_lz_a16": "vs_ids.asm",
555 "ps_gather_wrap": "vs_ids.asm", "ps_ssharp": "vs_ids.asm", 556 **{name: "vs_ids.asm" for name in TEXTURE_CONSTANTS}, "ps_ssharp": "vs_ids.asm",
556 **{name: "vs_ids.asm" for name in GRADIENT_TESTS}, "vs_clip": "ps_clip_color.asm", 557 **{name: "vs_ids.asm" for name in GRADIENT_TESTS}, "vs_clip": "ps_clip_color.asm",
557 "ps_interp_f16_high": "vs_f16_pack.asm", "ms_f16_pack": "ps_interp_f16_high.asm", 558 "ps_interp_f16_high": "vs_f16_pack.asm", "ms_f16_pack": "ps_interp_f16_high.asm",
558 "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm"} 559 "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm",
560 SIGNED_MIP_TEST: "vs_ids.asm"}
559DRAWN_WITH.update({name: "vs_ids.asm" for name in GET_LOD_TESTS}) 561DRAWN_WITH.update({name: "vs_ids.asm" for name in GET_LOD_TESTS})
560 562
561 563
@@ -873,7 +875,7 @@ def run_suite(a, work: str) -> int:
873 "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", 875 "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load",
874 "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", 876 "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent",
875 "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end", 877 "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end",
876 "cs_barrier_loop", "cs_w64x_andn2_exec"): 878 "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64"):
877 cs_dump_wants = { 879 cs_dump_wants = {
878 "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], 880 "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000],
879 # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone 881 # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone
@@ -938,6 +940,7 @@ def run_suite(a, work: str) -> int:
938 "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], 940 "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031],
939 "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], 941 "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32],
940 "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) 942 "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header)
943 "cs_w64x_saveexec_b64": [6160, 12304, 5120, 2088, 6168, 8192, 7176, 1837171], # .asm header
941 "cs_bpermute32": [0, 50, 162, 99, 36, 218, 183, 15], # wave32: needs 32 lanes 944 "cs_bpermute32": [0, 50, 162, 99, 36, 218, 183, 15], # wave32: needs 32 lanes
942 # SHADER-91: s_barrier sites in different wave-uniform branches meet (cs_barrier_divergent.asm) 945 # SHADER-91: s_barrier sites in different wave-uniform branches meet (cs_barrier_divergent.asm)
943 "cs_barrier_divergent": [127, 126, 125, 124, 123, 122, 121, 120], 946 "cs_barrier_divergent": [127, 126, 125, 124, 123, 122, 121, 120],
@@ -1015,8 +1018,8 @@ def run_suite(a, work: str) -> int:
1015 results.append((name, ok, detail)) 1018 results.append((name, ok, detail))
1016 else: 1019 else:
1017 results.append((name, rc == 0 and "PASSED" in msg, msg.splitlines()[-1] if msg else "")) 1020 results.append((name, rc == 0 and "PASSED" in msg, msg.splitlines()[-1] if msg else ""))
1018 elif name == "ps_gather_wrap": 1021 elif name in TEXTURE_CONSTANTS:
1019 # SHADER-36: image_gather4_l_o under wrap/mirror/clamp/mirror-once S#s; every pixel holds GATHER_WRAP. 1022 expected = TEXTURE_CONSTANTS[name]
1020 tool = os.path.join(a.build, "vk_texture_test" + ext) 1023 tool = os.path.join(a.build, "vk_texture_test" + ext)
1021 raw = os.path.join(raw_dir, f"{name}.raw") 1024 raw = os.path.join(raw_dir, f"{name}.raw")
1022 try: 1025 try:
@@ -1028,12 +1031,12 @@ def run_suite(a, work: str) -> int:
1028 bad = 4096 1031 bad = 4096
1029 if rc == 0 and os.path.isfile(raw): 1032 if rc == 0 and os.path.isfile(raw):
1030 data = Path(raw).read_bytes() 1033 data = Path(raw).read_bytes()
1031 bad = 4096 if len(data) != 64 * 64 * 16 else sum(q != GATHER_WRAP for q in struct.iter_unpack("<4f", data)) 1034 bad = 4096 if len(data) != 64 * 64 * 16 else sum(q != expected for q in struct.iter_unpack("<4f", data))
1032 if rc == UNSUPPORTED: 1035 if rc == UNSUPPORTED:
1033 results.append((name, None, unsupported_skip(msg))) 1036 results.append((name, None, unsupported_skip(msg)))
1034 else: 1037 else:
1035 results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else 1038 results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else
1036 f"{bad} pixels differ from {GATHER_WRAP}: {msg.splitlines()[-1] if msg else ''}")) 1039 f"{bad} pixels differ from {expected}: {msg.splitlines()[-1] if msg else ''}"))
1037 elif name == "ps_tex": 1040 elif name == "ps_tex":
1038 # A texture through the descriptor hash table and the bindless set. vk_bindless_test compares the 1041 # A texture through the descriptor hash table and the bindless set. vk_bindless_test compares the
1039 # pixels itself, and exits 77 where the device lacks a feature the set or the shader needs. 1042 # pixels itself, and exits 77 where the device lacks a feature the set or the shader needs.