diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 14:40:04 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-25 14:40:04 -0500 |
| commit | 16b5b540c0085f7ef7fd03aad67342c84e3e8ac9 (patch) | |
| tree | 90d4a798b92a2b3deef25a338c57e12d69b2f418 /scripts/run_gpu_tests.py | |
| parent | d64f12b53d275c71604fc7f6fee7302ce0f2baa9 (diff) | |
| parent | e18b59a5b77a8400f66b71b5f12d713bb12c63e0 (diff) | |
Merge main into test1700-rdna3-repacking
Conflict in docs/design.md: main added the "Per-lane descriptor selection"
row right above the SHADER-10 row this PR rewords. Both are kept.
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.py | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index fef03e9c9..a9d18b6ea 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -25,16 +25,17 @@ sys.path.insert(0, os.path.join(ROOT, "tools")) | |||
| 25 | import mc_command # noqa: E402 | 25 | import mc_command # noqa: E402 |
| 26 | sys.path.insert(0, SHADER_DIR) | 26 | sys.path.insert(0, SHADER_DIR) |
| 27 | from build import CLIP_CASES, clip_container, shader_source | 27 | from build import CLIP_CASES, clip_container, shader_source |
| 28 | from check import (Skip, clip_test, fmt_1010102_test, fmt_d16_xyz_test, fmt_int_narrow_test, fmt_sint32_test, | 28 | from 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) |
| 30 | from check import compute_unsupported # vk_compute_test's exit 77 over a feature the module needs | ||
| 31 | from compute_fixture import compute_header | 30 | from compute_fixture import compute_header |
| 32 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) | 31 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) |
| 33 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, CVT_PK_U8_WORDS, PK_MUL_LO_WORDS, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, | 32 | from 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) |
| 36 | from check import SIGNED_MIP_TEST, UINT_MIP_TEST | 35 | from check import SIGNED_MIP_TEST, UINT_MIP_TEST |
| 37 | from check import cbv_modulate_test | 36 | from check import cbv_modulate_test |
| 37 | from check import IMAGE_STORE_CASES, texture_uav_test | ||
| 38 | from check import salu_ext_test # 38 scalar ALU ops on operands seeded through VKC_SGPRS | ||
| 38 | from check import HEAP_INIT_EXPECTED, heap_init_env # cs_heap_init: vk_compute_test's VKC_HEAP_INIT | 39 | from check import HEAP_INIT_EXPECTED, heap_init_env # cs_heap_init: vk_compute_test's VKC_HEAP_INIT |
| 39 | from check import shift64_test # dynamic 64-bit vector shifts and overlapping destinations | 40 | from check import shift64_test # dynamic 64-bit vector shifts and overlapping destinations |
| 40 | from check import cmp_f64_test # the 32 binary64 vector compares on memory-fed operands | 41 | from check import cmp_f64_test # the 32 binary64 vector compares on memory-fed operands |
| @@ -677,7 +678,8 @@ def check_clip_half(raw_path: str, want_b: float, want_a: float) -> tuple[bool, | |||
| 677 | # 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 |
| 678 | # 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 |
| 679 | # checker runs them: the test program that owns them judges them. | 680 | # checker runs them: the test program that owns them judges them. |
| 680 | OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_translated_draw_test", | 681 | OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "ps_m15_dual": "d3d12_translated_draw_test", |
| 682 | "vs_m15": "d3d12_translated_draw_test", | ||
| 681 | "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", |
| 682 | "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", |
| 683 | "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", |
| @@ -685,7 +687,8 @@ OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_transl | |||
| 685 | "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", |
| 686 | "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", |
| 687 | "ps_live_width": "w64_graphics.py", | 689 | "ps_live_width": "w64_graphics.py", |
| 688 | "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"} | ||
| 689 | 692 | ||
| 690 | 693 | ||
| 691 | # 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). |
| @@ -1126,6 +1129,10 @@ def run_suite(a, work: str) -> int: | |||
| 1126 | vals = words[:len(USER_SGPRS_WORDS)] if words else [] | 1129 | vals = words[:len(USER_SGPRS_WORDS)] if words else [] |
| 1127 | results.append((name,) + compute_result(rc, msg, rc == 0 and vals == USER_SGPRS_WORDS, | 1130 | results.append((name,) + compute_result(rc, msg, rc == 0 and vals == USER_SGPRS_WORDS, |
| 1128 | " ".join(hex(x) for x in vals) if vals else msg)) | 1131 | " ".join(hex(x) for x in vals) if vals else msg)) |
| 1132 | elif name == "cs_w32_salu_ext": | ||
| 1133 | detail = salu_ext_test(a.build, spirv_dir, cs_env) | ||
| 1134 | results.append((name, None if isinstance(detail, Skip) else not detail, | ||
| 1135 | detail or "80 words exact (73 results of 38 scalar ops and the untouched fill)")) | ||
| 1129 | elif name == "cs_f64_add": | 1136 | elif name == "cs_f64_add": |
| 1130 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=cs_env) | 1137 | rc, msg = run_cmd([vk_compute, spv, "1", "dump"], env=cs_env) |
| 1131 | if rc == 77: # Float64, or Int64 where the module declares both: quote whichever it names | 1138 | if rc == 77: # Float64, or Int64 where the module declares both: quote whichever it names |
| @@ -1195,7 +1202,7 @@ def run_suite(a, work: str) -> int: | |||
| 1195 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. | 1202 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. |
| 1196 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. | 1203 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. |
| 1197 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) | 1204 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) |
| 1198 | 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", | 1205 | 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", |
| 1199 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", | 1206 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", |
| 1200 | "cs_dpp_bound", "cs_dpp_cmp", "cs_dpp_w64", | 1207 | "cs_dpp_bound", "cs_dpp_cmp", "cs_dpp_w64", |
| 1201 | "cs_w64_mask_detect", | 1208 | "cs_w64_mask_detect", |
| @@ -1204,11 +1211,12 @@ def run_suite(a, work: str) -> int: | |||
| 1204 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", | 1211 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", |
| 1205 | "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", | 1212 | "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", |
| 1206 | "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_barrier_early_end", | 1213 | "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_barrier_early_end", |
| 1207 | "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", | 1214 | "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_andn2_exec", |
| 1208 | "cs_mask_vgpr_exec", "cs_w32_exec_computed", "cs_w64_exec_computed"): | 1215 | "cs_mask_vgpr_exec", "cs_w32_exec_computed", "cs_w64_exec_computed"): |
| 1209 | cs_dump_wants = { | 1216 | cs_dump_wants = { |
| 1210 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], | 1217 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], |
| 1211 | # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone | 1218 | # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone |
| 1219 | "cs_smem_vcc_base": CS_SMEM_VCC, | ||
| 1212 | "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030, | 1220 | "cs_smem_soffset_imm": [0x5EED0024, 0x5EED0028, 0x5EED002C, 0x5EED0030, |
| 1213 | 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C], | 1221 | 0x5EED0010, 0x5EED0014, 0x5EED0018, 0x5EED001C], |
| 1214 | # SHADER-52: wave32 lane select & 31 (40 → 8) | 1222 | # SHADER-52: wave32 lane select & 31 (40 → 8) |
| @@ -1303,6 +1311,7 @@ def run_suite(a, work: str) -> int: | |||
| 1303 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], | 1311 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], |
| 1304 | "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) | 1312 | "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) |
| 1305 | "cs_w64x_saveexec_b64": [6160, 12304, 5120, 2088, 6168, 8192, 7176, 1837171], # .asm header | 1313 | "cs_w64x_saveexec_b64": [6160, 12304, 5120, 2088, 6168, 8192, 7176, 1837171], # .asm header |
| 1314 | "cs_w64x_cmp_sdst": [10240, 6144, 2053, 8224, 7714, 6184, 4144, 5], # .asm header | ||
| 1306 | "cs_bpermute32": [0, 50, 162, 99, 36, 218, 183, 15], # wave32: needs 32 lanes | 1315 | "cs_bpermute32": [0, 50, 162, 99, 36, 218, 183, 15], # wave32: needs 32 lanes |
| 1307 | # SHADER-91: s_barrier sites in different wave-uniform branches meet (cs_barrier_divergent.asm) | 1316 | # SHADER-91: s_barrier sites in different wave-uniform branches meet (cs_barrier_divergent.asm) |
| 1308 | "cs_barrier_divergent": [127, 126, 125, 124, 123, 122, 121, 120], | 1317 | "cs_barrier_divergent": [127, 126, 125, 124, 123, 122, 121, 120], |
| @@ -1363,15 +1372,13 @@ def run_suite(a, work: str) -> int: | |||
| 1363 | unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) | 1372 | unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) |
| 1364 | detail += f" (words {unjudged} not judged on this device: UNJUDGED_WORDS in check.py)" | 1373 | detail += f" (words {unjudged} not judged on this device: UNJUDGED_WORDS in check.py)" |
| 1365 | results.append((name, ok, detail)) | 1374 | results.append((name, ok, detail)) |
| 1366 | elif name == "cs_imgstore": | 1375 | elif name in IMAGE_STORE_CASES: |
| 1367 | rc, msg = run_cmd([vk_store, spv]) | 1376 | rc, msg = run_cmd([vk_store, spv, *IMAGE_STORE_CASES[name]]) |
| 1368 | results.append((name, *helper_result(rc, msg))) | ||
| 1369 | elif name == "cs_imgstore_cube": # GPU-CUBE-STORE: six-layer 2D-array views at bindings 11/12/13 | ||
| 1370 | rc, msg = run_cmd([vk_store, spv, "cube"]) | ||
| 1371 | results.append((name, *helper_result(rc, msg))) | ||
| 1372 | elif name in ("cs_imgload", "cs_imgload_tfe", "cs_imgload_d16", "cs_imgload_d16_tfe", "cs_sample_lz_int_d16"): | ||
| 1373 | rc, msg = run_cmd([vk_store, spv, "load" if name in ("cs_imgload", "cs_imgload_tfe") else "load-d16"]) | ||
| 1374 | results.append((name, *helper_result(rc, msg))) | 1377 | results.append((name, *helper_result(rc, msg))) |
| 1378 | elif name == "cs_texture_uav": | ||
| 1379 | problem = texture_uav_test(a.build, spv) | ||
| 1380 | results.append((name, None if isinstance(problem, Skip) else not problem, | ||
| 1381 | problem or "D3D12/Vulkan storage-image readback matched")) | ||
| 1375 | elif name in MIP_TEST_PASSES: | 1382 | elif name in MIP_TEST_PASSES: |
| 1376 | problem = texture_mip_test(a.build, spirv_dir, name) | 1383 | problem = texture_mip_test(a.build, spirv_dir, name) |
| 1377 | ok = None if isinstance(problem, Skip) else not problem | 1384 | ok = None if isinstance(problem, Skip) else not problem |