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:
authorAndretuta <Andretuta@users.noreply.github.com>2026-11-25 18:33:16 -0300
committerAndretuta <Andretuta@users.noreply.github.com>2026-11-25 18:33:16 -0300
commitadf9c3f20bbb6f7685770b301719bc7e4c357507 (patch)
tree178d820b89deaace44dd963c7f9c4ee1cad50a31 /scripts/run_gpu_tests.py
parent7430be3869d72fda88796f00efaacb7f1f965e71 (diff)
parent4eab4f6d34b61d9c66d54308a7af2b56539339a1 (diff)
Merge main into gpu/rx9070xt-refresh
Keep this branch's RX 9070 XT row and the rows main added below it (RX 9070, Ryzen 5 7600X iGPU, RTX 5070 Ti, RTX 3080). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py89
1 files changed, 67 insertions, 22 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index e8fce4277..cff55f21d 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -25,18 +25,22 @@ sys.path.insert(0, os.path.join(ROOT, "tools"))
25import mc_command # noqa: E402 25import mc_command # noqa: E402
26sys.path.insert(0, SHADER_DIR) 26sys.path.insert(0, SHADER_DIR)
27from build import CLIP_CASES, clip_container, shader_source 27from build import CLIP_CASES, clip_container, shader_source
28from check import (Skip, clip_test, fmt_1010102_test, fmt_d16_xyz_test, fmt_int_narrow_test, fmt_sint32_test, 28from check import (Skip, clip_test, fmt_1010102_test, fmt_d16_xyz_test, fmt_int_narrow_test,
29 fmt_xy_xyz_test, tbuffer_store_test) 29 fmt_sint32_test, fmt_xy_xyz_test, tbuffer_store_test, compute_unsupported)
30from check import compute_unsupported # vk_compute_test's exit 77 over a feature the module needs
31from compute_fixture import compute_header 30from compute_fixture import compute_header
32from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) 31from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test)
33from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, CVT_PK_U8_WORDS, PK_MUL_LO_WORDS, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, 32from check import (CS_SMEM_VCC, CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, CVT_PK_U8_WORDS, PK_MUL_LO_WORDS, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES,
34 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 TEXTURE_MIP_TEST, GATHER_LOD_TEST, MIP_TEST_PASSES, TEXTURE_CONSTANTS, USER_SGPRS_ENV, USER_SGPRS_WORDS, Skip, mesh_v5_test, not_found_message,
35 pick_build_dir, start_failure, table_fetch_test, texture_gradient_a16_test, texture_mip_test) 34 pick_build_dir, start_failure, table_fetch_test, texture_gradient_a16_test, texture_mip_test)
36from check import SIGNED_MIP_TEST, UINT_MIP_TEST 35from check import SIGNED_MIP_TEST, UINT_MIP_TEST
37from check import cbv_modulate_test 36from check import cbv_modulate_test
37from check import IMAGE_STORE_CASES, texture_uav_test
38from check import salu_ext_test # 38 scalar ALU ops on operands seeded through VKC_SGPRS
38from check import HEAP_INIT_EXPECTED, heap_init_env # cs_heap_init: vk_compute_test's VKC_HEAP_INIT 39from check import HEAP_INIT_EXPECTED, heap_init_env # cs_heap_init: vk_compute_test's VKC_HEAP_INIT
39from check import shift64_test # dynamic 64-bit vector shifts and overlapping destinations 40from check import shift64_test # dynamic 64-bit vector shifts and overlapping destinations
41from check import cmp_f64_test # the 32 binary64 vector compares on memory-fed operands
42from check import round_f64_test # the four binary64 roundings on memory-fed inputs
43from check import frexp_ldexp_test # binary32 and binary64 frexp, and v_ldexp_f32, on memory-fed records
40from check import judged_words, words_match # dump words not judged on some devices (cs_signed_zero_nan) 44from check import judged_words, words_match # dump words not judged on some devices (cs_signed_zero_nan)
41from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py 45from check import TEXOFF_ARGS, texoff_problem # ps_texoff's expected words and arguments live in check.py
42from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8 46from check import TEXOFF_FALLBACK, texoff_env # LEONIDA_TEXOFF_FALLBACK=1: texel offsets without maintenance8
@@ -94,10 +98,23 @@ def make_ms_psv0(threads_x: int, maxv: int, maxp: int, topology: int = 2, group_
94 return struct.pack("<I", len(r)) + bytes(r) 98 return struct.pack("<I", len(r)) + bytes(r)
95 99
96 100
101# A comment line a .asm carries when llvm-mc cannot assemble it (cs_dpp_cmp.asm: a VOPC compare in DPP form).
102TEXT_ONLY_MARK = "; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here"
103
104
97def assemble_to_s(llvm_mc: str, asm_path: str, s_path: str, name: str) -> None: 105def assemble_to_s(llvm_mc: str, asm_path: str, s_path: str, name: str) -> None:
98 """Assemble raw RDNA2 .asm with llvm-mc -show-encoding into .s format for rdna2spirv.py.""" 106 """Assemble raw RDNA2 .asm with llvm-mc -show-encoding into .s format for rdna2spirv.py."""
99 with open(asm_path, encoding="utf-8") as source: 107 with open(asm_path, encoding="utf-8") as source:
100 raw = source.read() 108 raw = source.read()
109 if any(ln.strip() == TEXT_ONLY_MARK for ln in raw.splitlines()):
110 # The source holds an instruction llvm-mc has no gfx1013 encoding for. The translator reads straight-line
111 # code from its text alone (tests/semantic/regen_fixtures.py writes such listings), so the lines go through
112 # as they are.
113 lines = [f"; {name} code 0x0..0x0 (synthetic), gfx1013, 0 invalid words"]
114 lines += ["\t" + ln.strip() for ln in raw.splitlines() if ln.strip() and not ln.lstrip().startswith(";")]
115 with open(s_path, "w", encoding="utf-8", newline="\n") as f:
116 f.write("\n".join(lines) + "\n")
117 return
101 cmd = mc_command.mc_command(llvm_mc) + ["-triple=amdgcn--amdpal", "-mcpu=gfx1013"] 118 cmd = mc_command.mc_command(llvm_mc) + ["-triple=amdgcn--amdpal", "-mcpu=gfx1013"]
102 for ln in raw.splitlines(): 119 for ln in raw.splitlines():
103 s = ln.strip() 120 s = ln.strip()
@@ -431,8 +448,10 @@ def judge_cs_dump(rc: int, msg: str, want: list[int], *, wave64: bool, partial:
431 return None, "SKIP (no 64-wide compute subgroup on this device)" 448 return None, "SKIP (no 64-wide compute subgroup on this device)"
432 if rc == 0 and wave64 and "compute subgroup size: 64" not in msg.splitlines(): 449 if rc == 0 and wave64 and "compute subgroup size: 64" not in msg.splitlines():
433 return False, "64-wide subgroup was not confirmed (rebuild vk_compute_test)" 450 return False, "64-wide subgroup was not confirmed (rebuild vk_compute_test)"
451 if rc != 0:
452 return False, f"exit {rc}: {msg or 'no test output'}"
434 words = dump_words(msg) 453 words = dump_words(msg)
435 if rc != 0 or words is None: 454 if words is None:
436 return False, msg 455 return False, msg
437 vals = words[:len(want)] 456 vals = words[:len(want)]
438 return words_match(vals, want), " ".join((hex if hexwords else str)(x) for x in vals) 457 return words_match(vals, want), " ".join((hex if hexwords else str)(x) for x in vals)
@@ -659,7 +678,8 @@ def check_clip_half(raw_path: str, want_b: float, want_a: float) -> tuple[bool,
659# Fixtures run by another harness, which needs what these tools do not have (a D3D12 device, the layer's root 678# Fixtures run by another harness, which needs what these tools do not have (a D3D12 device, the layer's root
660# arguments and code base). They are still assembled and translated here, so a translator regression shows, but no 679# arguments and code base). They are still assembled and translated here, so a translator regression shows, but no
661# checker runs them: the test program that owns them judges them. 680# checker runs them: the test program that owns them judges them.
662OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_translated_draw_test", 681OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "ps_m15_dual": "d3d12_translated_draw_test",
682 "vs_m15": "d3d12_translated_draw_test",
663 "ps_m2": "d3d12_m2_textured_test", "vs_m2": "d3d12_m2_textured_test", "ps_m2_uoff": "d3d12_m2_textured_test", 683 "ps_m2": "d3d12_m2_textured_test", "vs_m2": "d3d12_m2_textured_test", "ps_m2_uoff": "d3d12_m2_textured_test",
664 "ps_m2_literal": "d3d12_m2_textured_test", "ps_m2_array": "d3d12_m2_formats_test", 684 "ps_m2_literal": "d3d12_m2_textured_test", "ps_m2_array": "d3d12_m2_formats_test",
665 "ps_m3": "d3d12_m3_frame_test", "vs_m3": "d3d12_m3_frame_test", 685 "ps_m3": "d3d12_m3_frame_test", "vs_m3": "d3d12_m3_frame_test",
@@ -667,7 +687,8 @@ OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_transl
667 "cs_m4_fill": "d3d12_m4_compute_test", "cs_m4_indirect": "d3d12_m4_compute_test", 687 "cs_m4_fill": "d3d12_m4_compute_test", "cs_m4_indirect": "d3d12_m4_compute_test",
668 "cs_buf_typed": "d3d12_buffer_uav_test", "cs_buf_counter": "d3d12_buffer_uav_test", 688 "cs_buf_typed": "d3d12_buffer_uav_test", "cs_buf_counter": "d3d12_buffer_uav_test",
669 "ps_live_width": "w64_graphics.py", 689 "ps_live_width": "w64_graphics.py",
670 "ps_heap_index": "d3d12_heap_index_test"} 690 "ps_heap_index": "d3d12_heap_index_test",
691 "ps_quad_flat": "d3d12_quad_index_test", "vs_quad_inst": "d3d12_quad_index_test"}
671 692
672 693
673# Shaders a selected test draws with, built even when the filter leaves them out (#192). 694# Shaders a selected test draws with, built even when the filter leaves them out (#192).
@@ -983,10 +1004,22 @@ def run_suite(a, work: str) -> int:
983 if name in CLIP_CASES: 1004 if name in CLIP_CASES:
984 detail = clip_test(a.build, spirv_dir, name) 1005 detail = clip_test(a.build, spirv_dir, name)
985 results.append((name, None if isinstance(detail, Skip) else not detail, detail or "four pixel masks exact")) 1006 results.append((name, None if isinstance(detail, Skip) else not detail, detail or "four pixel masks exact"))
1007 elif name == "cs_w32_frexp_ldexp":
1008 detail = frexp_ldexp_test(a.build, spirv_dir, cs_env)
1009 results.append((name, None if isinstance(detail, Skip) else not detail,
1010 detail or "768 words exact (64 records, eight results each, and unchanged inputs)"))
986 elif name == "cs_w32_shift64": 1011 elif name == "cs_w32_shift64":
987 detail = shift64_test(a.build, spirv_dir, cs_env) 1012 detail = shift64_test(a.build, spirv_dir, cs_env)
988 results.append((name, None if isinstance(detail, Skip) else not detail, 1013 results.append((name, None if isinstance(detail, Skip) else not detail,
989 detail or "640 words exact (64 shift cases and unchanged inputs)")) 1014 detail or "640 words exact (64 shift cases and unchanged inputs)"))
1015 elif name == "cs_w32_cmp_f64":
1016 detail = cmp_f64_test(a.build, spirv_dir, cs_env)
1017 results.append((name, None if isinstance(detail, Skip) else not detail,
1018 detail or "1536 words exact (256 operand pairs and unchanged inputs)"))
1019 elif name == "cs_w32_round_f64":
1020 detail = round_f64_test(a.build, spirv_dir, cs_env)
1021 results.append((name, None if isinstance(detail, Skip) else not detail,
1022 detail or "1152 words exact (64 inputs, eight roundings each, and unchanged inputs)"))
990 elif name == "cs_workgroup_yz": 1023 elif name == "cs_workgroup_yz":
991 rc, msg = run_cmd([vk_compute, spv, "2x3x4", "workgroup_yz"], env=cs_env) 1024 rc, msg = run_cmd([vk_compute, spv, "2x3x4", "workgroup_yz"], env=cs_env)
992 results.append((name,) + compute_result(rc, msg, rc == 0 and "2x3x4 workgroup Y/Z: 0 mismatches" 1025 results.append((name,) + compute_result(rc, msg, rc == 0 and "2x3x4 workgroup Y/Z: 0 mismatches"
@@ -1068,6 +1101,7 @@ def run_suite(a, work: str) -> int:
1068 elif name == "cs_tbuffer_store": 1101 elif name == "cs_tbuffer_store":
1069 # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header) 1102 # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header)
1070 problem = tbuffer_store_test(a.build, spirv_dir, cs_env) 1103 problem = tbuffer_store_test(a.build, spirv_dir, cs_env)
1104 results.append((name, not problem, problem or "128/128 dumped words exact"))
1071 elif name == "cs_fmt_d16_xyz": 1105 elif name == "cs_fmt_d16_xyz":
1072 # d16_xyz / d16_xy typed-buffer loads and d16_xyz stores (cs_fmt_d16_xyz.asm header) 1106 # d16_xyz / d16_xy typed-buffer loads and d16_xyz stores (cs_fmt_d16_xyz.asm header)
1073 problem = fmt_d16_xyz_test(a.build, spirv_dir, cs_env) 1107 problem = fmt_d16_xyz_test(a.build, spirv_dir, cs_env)
@@ -1096,6 +1130,10 @@ def run_suite(a, work: str) -> int:
1096 vals = words[:len(USER_SGPRS_WORDS)] if words else [] 1130 vals = words[:len(USER_SGPRS_WORDS)] if words else []
1097 results.append((name,) + compute_result(rc, msg, rc == 0 and vals == USER_SGPRS_WORDS, 1131 results.append((name,) + compute_result(rc, msg, rc == 0 and vals == USER_SGPRS_WORDS,
1098 " ".join(hex(x) for x in vals) if vals else msg)) 1132 " ".join(hex(x) for x in vals) if vals else msg))
1133 elif name == "cs_w32_salu_ext":
1134 detail = salu_ext_test(a.build, spirv_dir, cs_env)
1135 results.append((name, None if isinstance(detail, Skip) else not detail,
1136 detail or "80 words exact (73 results of 38 scalar ops and the untouched fill)"))
1099 elif name == "cs_f64_add": 1137 elif name == "cs_f64_add":
1100 rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=cs_env) 1138 rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=cs_env)
1101 if rc == 77: # Float64, or Int64 where the module declares both: quote whichever it names 1139 if rc == 77: # Float64, or Int64 where the module declares both: quote whichever it names
@@ -1165,20 +1203,21 @@ def run_suite(a, work: str) -> int:
1165 # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. 1203 # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none.
1166 # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. 1204 # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size.
1167 results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) 1205 results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated()))
1168 elif name in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap", "cs_w32_permlane_fi", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_lds_subdword", "cs_w32_lds_wide", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half", 1206 elif name in ("cs_smem_vcc_base", "cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap", "cs_w32_permlane_fi", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_lds_subdword", "cs_w32_lds_wide", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half",
1169 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", 1207 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi",
1170 "cs_dpp_bound", "cs_dpp_w64", 1208 "cs_dpp_bound", "cs_dpp_cmp", "cs_dpp_w64",
1171 "cs_w64_mask_detect", 1209 "cs_w64_mask_detect",
1172 "cs_w64x_readlane", "cs_w64x_writelane", "cs_w64x_readfirstlane", "cs_w64x_bpermute", "cs_w64x_permute", 1210 "cs_w64x_readlane", "cs_w64x_writelane", "cs_w64x_readfirstlane", "cs_w64x_bpermute", "cs_w64x_permute",
1173 "cs_w64x_branch", "cs_w64x_ballot", "cs_w64x_wg128_branches", "cs_w64x_lds_raw", 1211 "cs_w64x_branch", "cs_w64x_ballot", "cs_w64x_wg128_branches", "cs_w64x_lds_raw",
1174 "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", 1212 "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load",
1175 "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", 1213 "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent",
1176 "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_barrier_early_end", 1214 "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_barrier_early_end",
1177 "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_w32_andn2_exec", 1215"cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_w64x_cmp_sdst", "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_w32_wrxchg2_ext", "cs_w32_wrxchg2st64", "cs_w32_andn2_exec",
1178 "cs_mask_vgpr_exec", "cs_w32_exec_computed", "cs_w64_exec_computed"): 1216 "cs_mask_vgpr_exec", "cs_w32_exec_computed", "cs_w64_exec_computed"):
1179 cs_dump_wants = { 1217 cs_dump_wants = {
1180 "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], 1218 "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000],
1181 # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone 1219 # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone
1220 "cs_smem_vcc_base": CS_SMEM_VCC,
1182 "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030, 1221 "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030,
1183 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C], 1222 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C],
1184 # SHADER-52: wave32 lane select & 31 (40 → 8) 1223 # SHADER-52: wave32 lane select & 31 (40 → 8)
@@ -1212,6 +1251,12 @@ def run_suite(a, work: str) -> int:
1212 # ds_wrxchg*_rtn_b64, ds_or_rtn_b64, ds_min_f32, ds_max_rtn_f32 (cs_lds_xchg64_ext.asm header) 1251 # ds_wrxchg*_rtn_b64, ds_or_rtn_b64, ds_min_f32, ds_max_rtn_f32 (cs_lds_xchg64_ext.asm header)
1213 "cs_lds_xchg64_ext": [0x11110003, 0x33333333, 0xF00FF000, 0x04030201, 1252 "cs_lds_xchg64_ext": [0x11110003, 0x33333333, 0xF00FF000, 0x04030201,
1214 0x40302010, 0x70500705, 0x3FC00000, 0x80000000], 1253 0x40302010, 0x70500705, 0x3FC00000, 0x80000000],
1254 # ds_wrxchg2_rtn_b32's pair cases and ds_wrxchg2st64_rtn_b32
1255 # (cs_w32_wrxchg2_ext.asm / cs_w32_wrxchg2st64.asm headers)
1256 "cs_w32_wrxchg2_ext": [0x77777777, 0x88880008, 0x99990009, 0xDEADBEEF,
1257 0xAAAAAAAA, 0xBBBBBBBB, 0x12341234, 0x56785678],
1258 "cs_w32_wrxchg2st64": [0x33333333, 0x44444444, 0x55550005, 0x66660006,
1259 0xB0B00084, 0xB0B00088, 0xB0B00140, 0xB0B002C0],
1215 # ds_mskor, ds_and/xor_b64, ds_add_rtn_f32, ds_inc/dec/rsub_u32 (cs_lds_atomics_ext.asm header) 1260 # ds_mskor, ds_and/xor_b64, ds_add_rtn_f32, ds_inc/dec/rsub_u32 (cs_lds_atomics_ext.asm header)
1216 "cs_lds_atomics_ext": [0xF0F11234, 0xAB34CD78, 0x12345678, 0xF0F00F0F, 1261 "cs_lds_atomics_ext": [0xF0F11234, 0xAB34CD78, 0x12345678, 0xF0F00F0F,
1217 0xA5A55A5A, 0x00AA00AA, 0x7FB00000, 0xFE090700], 1262 0xA5A55A5A, 0x00AA00AA, 0x7FB00000, 0xFE090700],
@@ -1228,6 +1273,7 @@ def run_suite(a, work: str) -> int:
1228 "cs_dpp_bound": [10, 10, 11, 12, 13, 14, 15, 16], 1273 "cs_dpp_bound": [10, 10, 11, 12, 13, 14, 15, 16],
1229 "cs_dpp_bank": [0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFC, 7, 7, 7, 7], 1274 "cs_dpp_bank": [0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFC, 7, 7, 7, 7],
1230 "cs_dpp_fi": [1, 2, 3, 0x7777, 5, 6, 7, 0x7777], 1275 "cs_dpp_fi": [1, 2, 3, 0x7777, 5, 6, 7, 0x7777],
1276 "cs_dpp_cmp": [3, 2, 3, 2, 1, 0, 1, 0],
1231 "cs_dpp_w64": [1, 0, 3, 2, 5, 4, 7, 6], 1277 "cs_dpp_w64": [1, 0, 3, 2, 5, 4, 7, 6],
1232 # SHADER-99: -0 and NaN survive (SignedZeroInfNanPreserve, cs_signed_zero_nan.asm); 0 in out[4..7] 1278 # SHADER-99: -0 and NaN survive (SignedZeroInfNanPreserve, cs_signed_zero_nan.asm); 0 in out[4..7]
1233 # without it 1279 # without it
@@ -1272,6 +1318,7 @@ def run_suite(a, work: str) -> int:
1272 "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], 1318 "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32],
1273 "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) 1319 "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header)
1274 "cs_w64x_saveexec_b64": [6160, 12304, 5120, 2088, 6168, 8192, 7176, 1837171], # .asm header 1320 "cs_w64x_saveexec_b64": [6160, 12304, 5120, 2088, 6168, 8192, 7176, 1837171], # .asm header
1321 "cs_w64x_cmp_sdst": [10240, 6144, 2053, 8224, 7714, 6184, 4144, 5], # .asm header
1275 "cs_bpermute32": [0, 50, 162, 99, 36, 218, 183, 15], # wave32: needs 32 lanes 1322 "cs_bpermute32": [0, 50, 162, 99, 36, 218, 183, 15], # wave32: needs 32 lanes
1276 # SHADER-91: s_barrier sites in different wave-uniform branches meet (cs_barrier_divergent.asm) 1323 # SHADER-91: s_barrier sites in different wave-uniform branches meet (cs_barrier_divergent.asm)
1277 "cs_barrier_divergent": [127, 126, 125, 124, 123, 122, 121, 120], 1324 "cs_barrier_divergent": [127, 126, 125, 124, 123, 122, 121, 120],
@@ -1300,9 +1347,9 @@ def run_suite(a, work: str) -> int:
1300 "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", 1347 "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops",
1301 "cs_w32_lds_subdword", "cs_w32_lds_wide", 1348 "cs_w32_lds_subdword", "cs_w32_lds_wide",
1302 "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_w32_permlane_fi", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap", 1349 "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_w32_permlane_fi", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap",
1303 "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", 1350 "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_w32_wrxchg2_ext", "cs_w32_wrxchg2st64", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec",
1304 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", 1351 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8",
1305 "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi", "cs_w32_andn2_exec", 1352 "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi", "cs_dpp_cmp", "cs_w32_andn2_exec",
1306 "cs_w32_exec_computed") and not emulated and not partial 1353 "cs_w32_exec_computed") and not emulated and not partial
1307 if partial and not emulated: 1354 if partial and not emulated:
1308 cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") 1355 cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64")
@@ -1316,7 +1363,7 @@ def run_suite(a, work: str) -> int:
1316 continue 1363 continue
1317 if rc == 0: 1364 if rc == 0:
1318 skip = wave32_lane_skip(msg) 1365 skip = wave32_lane_skip(msg)
1319 if skip is None and name in WAVE32_PIN_DUMPS: 1366 if rc == 0 and skip is None and name in WAVE32_PIN_DUMPS:
1320 # the device may not be able to run the wave size this fixture was written for (a 64-only device 1367 # the device may not be able to run the wave size this fixture was written for (a 64-only device
1321 # can't pin 32, so cs_barrier_loop's words mean nothing); check.py skips it too 1368 # can't pin 32, so cs_barrier_loop's words mean nothing); check.py skips it too
1322 skip = subgroup_pin_skip(msg, cs_env) 1369 skip = subgroup_pin_skip(msg, cs_env)
@@ -1327,20 +1374,18 @@ def run_suite(a, work: str) -> int:
1327 ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, 1374 ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated,
1328 hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", 1375 hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16",
1329 "cs_w32_lds_subdword", "cs_w32_lds_wide", 1376 "cs_w32_lds_subdword", "cs_w32_lds_wide",
1330 "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_signed_zero_nan")) 1377 "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_w32_wrxchg2_ext", "cs_w32_wrxchg2st64", "cs_signed_zero_nan"))
1331 if ok and None in want: 1378 if ok and None in want:
1332 unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) 1379 unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None)
1333 detail += f" (words {unjudged} not judged on this device: UNJUDGED_WORDS in check.py)" 1380 detail += f" (words {unjudged} not judged on this device: UNJUDGED_WORDS in check.py)"
1334 results.append((name, ok, detail)) 1381 results.append((name, ok, detail))
1335 elif name == "cs_imgstore": 1382 elif name in IMAGE_STORE_CASES:
1336 rc, msg = run_cmd([vk_store, spv]) 1383 rc, msg = run_cmd([vk_store, spv, *IMAGE_STORE_CASES[name]])
1337 results.append((name, *helper_result(rc, msg)))
1338 elif name == "cs_imgstore_cube": # GPU-CUBE-STORE: six-layer 2D-array views at bindings 11/12/13
1339 rc, msg = run_cmd([vk_store, spv, "cube"])
1340 results.append((name, *helper_result(rc, msg)))
1341 elif name in ("cs_imgload", "cs_imgload_tfe", "cs_imgload_d16", "cs_imgload_d16_tfe", "cs_sample_lz_int_d16"):
1342 rc, msg = run_cmd([vk_store, spv, "load" if name in ("cs_imgload", "cs_imgload_tfe") else "load-d16"])
1343 results.append((name, *helper_result(rc, msg))) 1384 results.append((name, *helper_result(rc, msg)))
1385 elif name == "cs_texture_uav":
1386 problem = texture_uav_test(a.build, spv)
1387 results.append((name, None if isinstance(problem, Skip) else not problem,
1388 problem or "D3D12/Vulkan storage-image readback matched"))
1344 elif name in MIP_TEST_PASSES: 1389 elif name in MIP_TEST_PASSES:
1345 problem = texture_mip_test(a.build, spirv_dir, name) 1390 problem = texture_mip_test(a.build, spirv_dir, name)
1346 ok = None if isinstance(problem, Skip) else not problem 1391 ok = None if isinstance(problem, Skip) else not problem