diff options
| author | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-21 18:28:19 -0300 |
|---|---|---|
| committer | Luiz Neves <luizgustavobenicio@gmail.com> | 2026-11-21 18:29:45 -0300 |
| commit | cdc67e4d20e793da260d08e55d0793d6952fc75f (patch) | |
| tree | e997dcc2d1b71158fa6b7492e5d19762d870b44a /scripts | |
| parent | 4e390e0871d7265e629b51aca8ff99a15a6a6845 (diff) | |
GPU tests: report gs_tri/ms_tri as SKIP without geometry or mesh shaders (TEST-18)
vk_harness exits 77, the code vk_compute_test and vk_store_test already use for a
device that cannot run a test, when VKH_GS is set and the device has no
geometryShader, or VKH_MESH is set and it has no VK_EXT_mesh_shader. Before, a
missing mesh extension exited 1 and a missing geometryShader failed in
vkCreateDevice with VK_ERROR_FEATURE_NOT_PRESENT (MoltenVK, #166).
run_gpu_tests.py (gs_tri, ms_tri, ms_w64x_ballot, ms_clip) and check.py
(ms_w64x_ballot) turn that exit code into SKIP, quoting the harness's reason.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/run_gpu_tests.py | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index edd5cad19..c77c2ad18 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -203,6 +203,15 @@ def read_raw_u32(path: str) -> list[tuple[int, int, int, int]]: | |||
| 203 | return [struct.unpack_from("<4I", data, 16 * i) for i in range(n)] | 203 | return [struct.unpack_from("<4I", data, 16 * i) for i in range(n)] |
| 204 | 204 | ||
| 205 | 205 | ||
| 206 | UNSUPPORTED = 77 # vk_harness: the device lacks a stage the test draws with (geometry or mesh shaders) | ||
| 207 | |||
| 208 | |||
| 209 | def unsupported_skip(msg: str) -> str: | ||
| 210 | """The SKIP detail for a harness that exited UNSUPPORTED, quoting its "unsupported: ..." line.""" | ||
| 211 | m = re.search(r"unsupported: .*", msg) | ||
| 212 | return f"SKIP ({m.group(0) if m else 'unsupported device'})" | ||
| 213 | |||
| 214 | |||
| 206 | def run_cmd(cmd: list[str], env: dict | None = None) -> tuple[int, str]: | 215 | def run_cmd(cmd: list[str], env: dict | None = None) -> tuple[int, str]: |
| 207 | p = subprocess.run(cmd, capture_output=True, text=True, env=env) | 216 | p = subprocess.run(cmd, capture_output=True, text=True, env=env) |
| 208 | return p.returncode, (p.stdout + "\n" + p.stderr).strip() | 217 | return p.returncode, (p.stdout + "\n" + p.stderr).strip() |
| @@ -561,7 +570,9 @@ def run_suite(a, work: str) -> int: | |||
| 561 | raw = os.path.join(raw_dir, f"{name}.raw") | 570 | raw = os.path.join(raw_dir, f"{name}.raw") |
| 562 | env = dict(gfx_env or os.environ, VKH_GS=spv) | 571 | env = dict(gfx_env or os.environ, VKH_GS=spv) |
| 563 | rc, msg = run_cmd([vk_harness, vs_tri, fs_loc1, raw], env=env) | 572 | rc, msg = run_cmd([vk_harness, vs_tri, fs_loc1, raw], env=env) |
| 564 | if rc != 0: | 573 | if rc == UNSUPPORTED: |
| 574 | results.append((name, None, unsupported_skip(msg))) | ||
| 575 | elif rc != 0: | ||
| 565 | results.append((name, False, msg)) | 576 | results.append((name, False, msg)) |
| 566 | else: | 577 | else: |
| 567 | ok, detail = check_grad(raw, 0.0, 0.0) | 578 | ok, detail = check_grad(raw, 0.0, 0.0) |
| @@ -574,7 +585,9 @@ def run_suite(a, work: str) -> int: | |||
| 574 | # the wave64 compute dumps are. | 585 | # the wave64 compute dumps are. |
| 575 | no64 = (name == "ms_w64x_ballot" and os.environ.get("LEONIDA_W64_EMULATE") != "1" and | 586 | no64 = (name == "ms_w64x_ballot" and os.environ.get("LEONIDA_W64_EMULATE") != "1" and |
| 576 | not any(int(x) >= 64 for x in re.findall(r"subgroup \d+\.\.(\d+)", msg))) | 587 | not any(int(x) >= 64 for x in re.findall(r"subgroup \d+\.\.(\d+)", msg))) |
| 577 | if rc != 0: | 588 | if rc == UNSUPPORTED: |
| 589 | results.append((name, None, unsupported_skip(msg))) | ||
| 590 | elif rc != 0: | ||
| 578 | results.append((name, False, msg)) | 591 | results.append((name, False, msg)) |
| 579 | elif no64: | 592 | elif no64: |
| 580 | results.append((name, None, "SKIP (no 64-wide subgroup on this device)")) | 593 | results.append((name, None, "SKIP (no 64-wide subgroup on this device)")) |
| @@ -585,7 +598,9 @@ def run_suite(a, work: str) -> int: | |||
| 585 | raw = os.path.join(raw_dir, f"{name}.raw") | 598 | raw = os.path.join(raw_dir, f"{name}.raw") |
| 586 | env = dict(gfx_env or os.environ, VKH_MESH="1") | 599 | env = dict(gfx_env or os.environ, VKH_MESH="1") |
| 587 | rc, msg = run_cmd([vk_harness, spv, fs_passthru, raw], env=env) | 600 | rc, msg = run_cmd([vk_harness, spv, fs_passthru, raw], env=env) |
| 588 | if rc != 0: | 601 | if rc == UNSUPPORTED: |
| 602 | results.append((name, None, unsupported_skip(msg))) | ||
| 603 | elif rc != 0: | ||
| 589 | results.append((name, False, msg)) | 604 | results.append((name, False, msg)) |
| 590 | else: | 605 | else: |
| 591 | ok, detail = check_clip_half(raw, 0.5, 1.0) | 606 | ok, detail = check_clip_half(raw, 0.5, 1.0) |