diff options
| author | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 15:16:51 -0500 |
|---|---|---|
| committer | ItsNotRexed <300290919+ItsNotRexed@users.noreply.github.com> | 2026-11-22 15:16:51 -0500 |
| commit | ea508e6839e34a347327b7e64fb0d152fe7686fd (patch) | |
| tree | c48c5e65383e240701edbe1b2c205537ecf8f0b6 /tools/first_light.py | |
| parent | c2e575649b25e87b4699c5db3f7f3ad065a885dc (diff) | |
| parent | 95e2aff60cc6f8759fcf20f5c1096c56ce16c27b (diff) | |
Merge pull request #3307 from Vonsek
Diffstat (limited to 'tools/first_light.py')
| -rw-r--r-- | tools/first_light.py | 15 |
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 | ||
| 41 | TOOLS = os.path.dirname(os.path.abspath(__file__)) | 41 | TOOLS = os.path.dirname(os.path.abspath(__file__)) |
| 42 | ROOT = os.path.dirname(TOOLS) | 42 | ROOT = os.path.dirname(TOOLS) |
| 43 | sys.path.insert(0, os.path.join(ROOT, "runtime", "test", "shaders")) | ||
| 44 | from compute_fixture import find_test_program # noqa: E402 | ||
| 45 | |||
| 43 | DEFAULT_VS = "VS_main_170e32e6_Wrapped" | 46 | DEFAULT_VS = "VS_main_170e32e6_Wrapped" |
| 44 | DEFAULT_PS = "$PS_Rage_Untextured_14f8529b_Wrapped" | 47 | DEFAULT_PS = "$PS_Rage_Untextured_14f8529b_Wrapped" |
| 45 | DEFAULT_TEXTURED_PS = "PS_Copy_3ea4b38a_Wrapped" | 48 | DEFAULT_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 | ||
| 385 | def find_harness(explicit: str | None) -> str: | 388 | def 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" |