diff options
| author | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 15:34:07 +0100 |
|---|---|---|
| committer | AlxcBTW <187763517+AlxcBTW@users.noreply.github.com> | 2026-11-22 15:34:07 +0100 |
| commit | 537486c87536bef2ca7d105f2e840c22d0b9597a (patch) | |
| tree | b5e90c797b20ba6dd5d744037b12934d39ede682 /scripts/run_gpu_tests.py | |
| parent | f209d86b8fbe8983803ff7ec4c042d8c93275321 (diff) | |
| parent | 2d2eec9a75e3f98cf26b6a55df58d0bd90366ba3 (diff) | |
Merge remote-tracking branch 'fork/m4-synthetic-gate' into buffer-uav-typed-counter
# Conflicts:
# docs/d3d12_vulkan.md
# runtime/shims/d3d12_vulkan_device.cpp
Diffstat (limited to 'scripts/run_gpu_tests.py')
| -rw-r--r-- | scripts/run_gpu_tests.py | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 9bc0ab704..bba041b09 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -25,7 +25,7 @@ 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_xy_xyz_test | 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_sint32_test, fmt_xy_xyz_test |
| 29 | from compute_fixture import compute_header | 29 | from compute_fixture import compute_header |
| 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) | 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) |
| 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, | 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, |
| @@ -40,6 +40,7 @@ from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, | |||
| 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py | 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py |
| 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem # pixel producers and checks | 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem # pixel producers and checks |
| 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries | 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries |
| 43 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide | ||
| 43 | 44 | ||
| 44 | 45 | ||
| 45 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: | 46 | def make_dxbc(chunks: list[tuple[bytes, bytes]]) -> bytes: |
| @@ -757,6 +758,12 @@ def run_suite(a, work: str) -> int: | |||
| 757 | for fname in asm_files: | 758 | for fname in asm_files: |
| 758 | name = os.path.splitext(fname)[0] | 759 | name = os.path.splitext(fname)[0] |
| 759 | spv = os.path.join(spirv_dir, f"{name}.spv") | 760 | spv = os.path.join(spirv_dir, f"{name}.spv") |
| 761 | if name == "ps_ij_computed" and (bary_fallback() or f16_interp_fallback()): | ||
| 762 | # Before the .spv check: without PerVertexKHR inputs the translator refuses a computed I/J pair, so there | ||
| 763 | # is no .spv (the f16 fallback is on by default where PerVertexKHR doesn't compile: MoltenVK). | ||
| 764 | results.append((name, None, "SKIP (computed I/J pairs need PerVertexKHR inputs: " | ||
| 765 | "no --bary-fallback / --f16-interp-fallback)")) | ||
| 766 | continue | ||
| 760 | if not os.path.isfile(spv): | 767 | if not os.path.isfile(spv): |
| 761 | results.append((name, False, "missing .spv (translation failed)")) | 768 | results.append((name, False, "missing .spv (translation failed)")) |
| 762 | continue | 769 | continue |
| @@ -827,6 +834,9 @@ def run_suite(a, work: str) -> int: | |||
| 827 | elif name == "cs_fmt_1010102": | 834 | elif name == "cs_fmt_1010102": |
| 828 | problem = fmt_1010102_test(a.build, spirv_dir, cs_env) | 835 | problem = fmt_1010102_test(a.build, spirv_dir, cs_env) |
| 829 | results.append((name, not problem, problem or "64/64 dumped words exact")) | 836 | results.append((name, not problem, problem or "64/64 dumped words exact")) |
| 837 | elif name == "cs_fmt_sint32": | ||
| 838 | problem = fmt_sint32_test(a.build, spirv_dir, cs_env) | ||
| 839 | results.append((name, not problem, problem or "64/64 dumped words exact")) | ||
| 830 | elif name == "cs_fmt_xy_xyz": | 840 | elif name == "cs_fmt_xy_xyz": |
| 831 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) | 841 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) |
| 832 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) | 842 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) |
| @@ -862,7 +872,7 @@ def run_suite(a, work: str) -> int: | |||
| 862 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. | 872 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. |
| 863 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. | 873 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. |
| 864 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) | 874 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) |
| 865 | elif name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "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", | 875 | elif name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "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", |
| 866 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", | 876 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", |
| 867 | "cs_dpp_bound", "cs_dpp_w64", | 877 | "cs_dpp_bound", "cs_dpp_w64", |
| 868 | "cs_w64_mask_detect", | 878 | "cs_w64_mask_detect", |
| @@ -933,6 +943,7 @@ def run_suite(a, work: str) -> int: | |||
| 933 | "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], | 943 | "cs_w64x_partial": [40, 40, 528, 0, 0, 532, 539, 524820], |
| 934 | "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave | 944 | "cs_w64x_partial_scmp": [0, 1, 0, 1, 1, 1, 1, 0], # s_cmp mask, -1 in a partial wave |
| 935 | "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 | 945 | "cs_w32_partial_scmp": [0, 1, 1, 0, 1, 1, 1, 1], # the same in a 20-thread wave32 |
| 946 | "cs_w32_sincos": [1, 1, 1, 1, 1, 1], # SHADER-88 (cs_w32_sincos.asm): angles in turns | ||
| 936 | "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], | 947 | "cs_w64x_sbarrier": [605, 605, 686, 686, 3032, 3013, 3032, 3031], |
| 937 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], | 948 | "cs_w64x_load_ballot_load": [43, 74, 75, 42, 42, 18, 41, 32], |
| 938 | "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) | 949 | "cs_w64x_andn2_exec": [1, 16, 32, 4144, 2052, 3, 8, 1544], # s_andn2_saveexec/wrexec_b64 (.asm header) |
| @@ -947,7 +958,7 @@ def run_suite(a, work: str) -> int: | |||
| 947 | } | 958 | } |
| 948 | want = cs_dump_wants[name] | 959 | want = cs_dump_wants[name] |
| 949 | # Every dump but cs_store / cs_smem_soffset_imm / cs_w32_lane_wrap / cs_movrelsd_2 / cs_w32_permute / | 960 | # Every dump but cs_store / cs_smem_soffset_imm / cs_w32_lane_wrap / cs_movrelsd_2 / cs_w32_permute / |
| 950 | # cs_w32_lds_u8_d16 / cs_w32_int_ext / cs_w32_salu64 / cs_w32_misc_ext / cs_w32_new_ops, the wave32 | 961 | # cs_w32_lds_u8_d16 / cs_w32_sincos / cs_w32_int_ext / cs_w32_salu64 / cs_w32_misc_ext / cs_w32_new_ops, the wave32 |
| 951 | # cs_wqm_w32 / cs_bpermute32 and the DPP tests is a whole-wave (wave64) mask test: ask for a 64-wide subgroup and skip, | 962 | # cs_wqm_w32 / cs_bpermute32 and the DPP tests is a whole-wave (wave64) mask test: ask for a 64-wide subgroup and skip, |
| 952 | # as check.py does, where the device has none | 963 | # as check.py does, where the device has none |
| 953 | # (vk_compute_test exits 77) instead of reporting a failure. With LEONIDA_W64_EMULATE=1 they were | 964 | # (vk_compute_test exits 77) instead of reporting a failure. With LEONIDA_W64_EMULATE=1 they were |
| @@ -959,7 +970,7 @@ def run_suite(a, work: str) -> int: | |||
| 959 | wave64 = name not in ("cs_store", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", | 970 | wave64 = name not in ("cs_store", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", |
| 960 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", | 971 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", |
| 961 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", | 972 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", |
| 962 | "cs_bpermute32", "cs_w32_partial_scmp", | 973 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", |
| 963 | "cs_exec_const", "cs_w32_mask_imm", "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", | 974 | "cs_exec_const", "cs_w32_mask_imm", "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", |
| 964 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial | 975 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial |
| 965 | if partial and not emulated: | 976 | if partial and not emulated: |
| @@ -1068,7 +1079,7 @@ def run_suite(a, work: str) -> int: | |||
| 1068 | raw = os.path.join(raw_dir, f"{name}.raw") | 1079 | raw = os.path.join(raw_dir, f"{name}.raw") |
| 1069 | vs = os.path.join(spirv_dir, "vs_ids.spv") if name == "ps_flat" else vs_tri # check.py draws ps_flat with vs_ids | 1080 | vs = os.path.join(spirv_dir, "vs_ids.spv") if name == "ps_flat" else vs_tri # check.py draws ps_flat with vs_ids |
| 1070 | if name in PIXEL_VERTEX: | 1081 | if name in PIXEL_VERTEX: |
| 1071 | if bary_fallback() and name in ("ps_interp_f16_high", "ps_ij_computed"): # no PerVertexKHR inputs | 1082 | if bary_fallback() and name == "ps_interp_f16_high": # no PerVertexKHR inputs under --bary-fallback |
| 1072 | results.append((name, None, "SKIP (per-vertex f16 interpolants need barycentrics)")) | 1083 | results.append((name, None, "SKIP (per-vertex f16 interpolants need barycentrics)")) |
| 1073 | continue | 1084 | continue |
| 1074 | vs = os.path.join(spirv_dir, PIXEL_VERTEX[name] + ".spv") | 1085 | vs = os.path.join(spirv_dir, PIXEL_VERTEX[name] + ".spv") |
| @@ -1113,6 +1124,7 @@ def run_suite(a, work: str) -> int: | |||
| 1113 | "ps_f16_const": (0xAAAA3D00, 0x38005555, 0xAAAA3800, 0x3F000000), | 1124 | "ps_f16_const": (0xAAAA3D00, 0x38005555, 0xAAAA3800, 0x3F000000), |
| 1114 | "ps_f16_const2": (0x42003D00, 0x3D004200, 0xAAAABC00, 3), | 1125 | "ps_f16_const2": (0x42003D00, 0x3D004200, 0xAAAABC00, 3), |
| 1115 | "ps_f16_pack": (0x34003C00, 0x38003400, 0x34000000, 0x44004200), | 1126 | "ps_f16_pack": (0x34003C00, 0x38003400, 0x34000000, 0x44004200), |
| 1127 | "ps_f16_pack_mods": (0x4400B400, 0xC4003400, 0x4400C200, 0xB400B400), | ||
| 1116 | "ps_sff_imm": (2, 1, 20, 16), # SHADER-46: s_ff0/s_ff1 of an immediate | 1128 | "ps_sff_imm": (2, 1, 20, 16), # SHADER-46: s_ff0/s_ff1 of an immediate |
| 1117 | "ps_fnan_med3": (0x40A00000, 0xC0200000, 0xC0200000, 0x40600000), # measured on RDNA2 hardware | 1129 | "ps_fnan_med3": (0x40A00000, 0xC0200000, 0xC0200000, 0x40600000), # measured on RDNA2 hardware |
| 1118 | "ps_fnan_fract": (0x3F7FFFFF, 0x00003BFF, 0xC0200000, 0xC0200000), | 1130 | "ps_fnan_fract": (0x3F7FFFFF, 0x00003BFF, 0xC0200000, 0xC0200000), |
| @@ -1126,7 +1138,11 @@ def run_suite(a, work: str) -> int: | |||
| 1126 | # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) | 1138 | # v_mad_u32_u16 / v_mad_i32_i16 and v_subrev_f16, which had CPU checks only (.asm headers) |
| 1127 | "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), | 1139 | "ps_valu16_mad": (0x00000002, 0x00030002, 0x00008000, 0x00000004), |
| 1128 | "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), | 1140 | "ps_valu16_subrev": (0xAAAABC00, 0xAAAAC000, 0xAAAA3C00, 0x42003800), |
| 1141 | "ps_w64x_readlane": (0x40000079, 0x40000010, 0x40000064, 0x400000BE), # same expectation as check.py | ||
| 1129 | } | 1142 | } |
| 1143 | if skip := wide_pixel_skip(name, msg): # a 64-wide pixel stage the device could not give: nothing to judge | ||
| 1144 | results.append((name, None, str(skip))) | ||
| 1145 | continue | ||
| 1130 | if name in const_wants: | 1146 | if name in const_wants: |
| 1131 | if name == "ps_vcmpx_forms" and (skip := vcmpx_forms_narrow_skip(msg)): | 1147 | if name == "ps_vcmpx_forms" and (skip := vcmpx_forms_narrow_skip(msg)): |
| 1132 | ok, detail = None, str(skip) | 1148 | ok, detail = None, str(skip) |