upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/first_light.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/first_light.py b/tools/first_light.py
index cce6b412e..4fca31e0d 100644
--- a/tools/first_light.py
+++ b/tools/first_light.py
@@ -40,6 +40,9 @@ import sys
40 40
41TOOLS = os.path.dirname(os.path.abspath(__file__)) 41TOOLS = os.path.dirname(os.path.abspath(__file__))
42ROOT = os.path.dirname(TOOLS) 42ROOT = os.path.dirname(TOOLS)
43sys.path.insert(0, os.path.join(ROOT, "runtime", "test", "shaders"))
44from compute_fixture import find_test_program # noqa: E402
45
43DEFAULT_VS = "VS_main_170e32e6_Wrapped" 46DEFAULT_VS = "VS_main_170e32e6_Wrapped"
44DEFAULT_PS = "$PS_Rage_Untextured_14f8529b_Wrapped" 47DEFAULT_PS = "$PS_Rage_Untextured_14f8529b_Wrapped"
45DEFAULT_TEXTURED_PS = "PS_Copy_3ea4b38a_Wrapped" 48DEFAULT_TEXTURED_PS = "PS_Copy_3ea4b38a_Wrapped"
@@ -383,16 +386,20 @@ def uv_probes(vertices, indices, width: int, height: int, limit: int = 4) -> lis
383 386
384 387
385def find_harness(explicit: str | None) -> str: 388def find_harness(explicit: str | None) -> str:
386 exe = ".exe" if os.name == "nt" else "" 389 executable = "vk_harness.exe" if os.name == "nt" else "vk_harness"
390 build = os.path.join(ROOT, "runtime", "build")
391 build_dirs = (os.path.join(build, "linux"), os.path.join(build, "windows"), build)
387 for candidate in ( 392 for candidate in (
388 explicit, 393 explicit,
389 os.environ.get("LEONIDA_VK_HARNESS"), 394 os.environ.get("LEONIDA_VK_HARNESS"),
390 os.path.join(ROOT, "runtime", "build", "linux", f"vk_harness{exe}"), 395 *(os.path.join(folder, executable) for folder in build_dirs),
391 os.path.join(ROOT, "runtime", "build", "windows", f"vk_harness{exe}"),
392 os.path.join(ROOT, "runtime", "build", f"vk_harness{exe}"),
393 ): 396 ):
394 if candidate and os.path.isfile(candidate): 397 if candidate and os.path.isfile(candidate):
395 return candidate 398 return candidate
399 for folder in build_dirs:
400 configured = find_test_program(folder, "vk_harness")
401 if configured:
402 return os.path.join(configured, executable)
396 raise SystemExit( 403 raise SystemExit(
397 "vk_harness not found: build runtime/build/linux or runtime/build/windows (target vk_harness), " 404 "vk_harness not found: build runtime/build/linux or runtime/build/windows (target vk_harness), "
398 "or set --harness/LEONIDA_VK_HARNESS" 405 "or set --harness/LEONIDA_VK_HARNESS"