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:
authorVicente Pacheco Aguilera <vpa.2007.vpa@gmail.com>2026-11-23 17:42:42 +0100
committerGitHub <noreply@github.com>2026-11-23 10:42:42 -0600
commit86a7807dd42be66227bc63ee71f6ab08be4f972c (patch)
treefac57a4d03a5be54268d1b2b30ffcd926e0f5637 /scripts/run_gpu_tests.py
parent042c5f37836dc2c8d5913c2fc5a88e99bdee083b (diff)
Barycentric fallback on by itself on AMD's Windows driver for gfx90c (#5933) (#6828)
Squash-merged after diff review of PR #6828
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py29
1 files changed, 25 insertions, 4 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index 8c6bdcf65..b766f2a78 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -304,10 +304,15 @@ def run_cmd(cmd: list[str], env: dict | None = None, gpu: bool = True, *,
304 304
305 305
306def bary_fallback() -> bool: 306def bary_fallback() -> bool:
307 """LEONIDA_BARY_FALLBACK=1: pixel shaders that read raw barycentrics are translated with --bary-fallback and drawn 307 """LEONIDA_BARY_FALLBACK=1 (or 0): translate raw barycentrics to an ordinary vec3 input and draw it through
308 through their pass-through geometry shader (tools/bary_fallback_gs.py), so they run on a device without 308 tools/bary_fallback_gs.py. Unset, it is on where tools/vk_subgroup_info.py reports a driver with a known
309 VK_KHR_fragment_shader_barycentric (NVIDIA Pascal, for one).""" 309 BaryCoordKHR bug: Mesa ANV (SHADER-925) and AMD's Windows driver on gfx90c iGPUs (#5933)."""
310 return (os.environ.get("LEONIDA_BARY_FALLBACK") or "").strip().lower() in ("1", "true", "yes", "on") 310 v = (os.environ.get("LEONIDA_BARY_FALLBACK") or "").strip().lower()
311 if v in ("1", "true", "yes", "on"):
312 return True
313 if v in ("0", "false", "no", "off"):
314 return False
315 return _device_barycentric_fallback() is True
311 316
312 317
313def f16_interp_fallback() -> bool: 318def f16_interp_fallback() -> bool:
@@ -323,6 +328,7 @@ def f16_interp_fallback() -> bool:
323 328
324 329
325_PER_VERTEX = [] 330_PER_VERTEX = []
331_BARYCENTRIC_FALLBACK = []
326 332
327 333
328def _device_per_vertex(): 334def _device_per_vertex():
@@ -339,6 +345,21 @@ def _device_per_vertex():
339 return _PER_VERTEX[0] 345 return _PER_VERTEX[0]
340 346
341 347
348def _device_barycentric_fallback():
349 """barycentric_fallback from tools/vk_subgroup_info.py (Mesa ANV, SHADER-925; AMD Windows on gfx90c, #5933),
350 cached per suite."""
351 if not _BARYCENTRIC_FALLBACK:
352 answer = None
353 try:
354 r = subprocess.run([sys.executable, "-I", os.path.join(ROOT, "tools", "vk_subgroup_info.py")],
355 capture_output=True, text=True, timeout=60)
356 answer = json.loads(r.stdout.strip().splitlines()[-1]).get("barycentric_fallback")
357 except (OSError, ValueError, IndexError, subprocess.SubprocessError):
358 pass
359 _BARYCENTRIC_FALLBACK.append(answer)
360 return _BARYCENTRIC_FALLBACK[0]
361
362
342def w64_emulated() -> bool: 363def w64_emulated() -> bool:
343 # Wave64 emulation on: the suite runs every wave64 check without asking for a 64-wide 364 # Wave64 emulation on: the suite runs every wave64 check without asking for a 64-wide
344 # subgroup, matching check.py (W64_EMULATED). Accepts "1"/"true"/"yes"/"on" and tolerates 365 # subgroup, matching check.py (W64_EMULATED). Accepts "1"/"true"/"yes"/"on" and tolerates