upleb.uk

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

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorS1m0ne1997 <347981799+S1m0ne1997@users.noreply.github.com>2026-11-22 16:00:07 +0100
committerS1m0ne1997 <347981799+S1m0ne1997@users.noreply.github.com>2026-11-22 16:00:07 +0100
commit94f392ac75be65d64178e3dc0b5bda8be7dba805 (patch)
tree280cb4674c2f7ddbd6394240e01758b9bdd4fbea /scripts
parent8cc972b88b32df1a74296a0368d4cd648d859f82 (diff)
parent6a6704df1592e1dc4a3215ddf1423a78adb52045 (diff)
Merge remote-tracking branch 'origin/main' into shader-33-vs-inputs
# Conflicts: # tests/test_shader_checks.py
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build_runtime.ps16
-rw-r--r--scripts/run_gpu_tests.py14
2 files changed, 13 insertions, 7 deletions
diff --git a/scripts/build_runtime.ps1 b/scripts/build_runtime.ps1
index e71bcfe27..b251a281c 100644
--- a/scripts/build_runtime.ps1
+++ b/scripts/build_runtime.ps1
@@ -1,4 +1,4 @@
1# Builds runtime\build\gta6rt.exe with MSVC at BelowNormal priority, on half the cores. 1# Builds runtime\build\gta6rt.exe with MSVC at BelowNormal priority, on half the cores.
2# Uses VS's CMake + Ninja when the "C++ CMake tools" component is installed, otherwise calls cl.exe directly. 2# Uses VS's CMake + Ninja when the "C++ CMake tools" component is installed, otherwise calls cl.exe directly.
3# The GameInput controller shim (SDL3, docs/gameinput.md) is built only on the CMake path: with an installed SDL3, or 3# The GameInput controller shim (SDL3, docs/gameinput.md) is built only on the CMake path: with an installed SDL3, or
4# with -FetchSdl3, which lets CMake download the pinned SDL3 release. The cl.exe fallback never builds it. 4# with -FetchSdl3, which lets CMake download the pinned SDL3 release. The cl.exe fallback never builds it.
@@ -58,8 +58,10 @@ if defined VULKAN_SDK cl /nologo /std:c++20 /EHsc /O2 /DWIN32_LEAN_AND_MEAN /DNO
58} 58}
59 59
60# A .cmd file avoids cmd.exe's quote stripping on paths with spaces. 60# A .cmd file avoids cmd.exe's quote stripping on paths with spaces.
61# Switch to UTF-8 (CP 65001) before invoking CMake/Ninja/cl.exe so non-English MSVC /showIncludes prefixes
62# (e.g. Spanish "Nota: inclusión del archivo:") match Ninja's msvc_deps_prefix instead of being mojibaked in OEM CP.
61$bat = Join-Path $out "_build.cmd" 63$bat = Join-Path $out "_build.cmd"
62"@echo off`r`nset `"PATH=$installer;%PATH%`"`r`ncall `"$vcvars`" >nul || exit /b 1`r`n$body" | Set-Content -Encoding ascii $bat 64"@echo off`r`nchcp 65001 >nul`r`nset `"PATH=$installer;%PATH%`"`r`ncall `"$vcvars`" >nul || exit /b 1`r`n$body" | Set-Content -Encoding ascii $bat
63 65
64$p = Start-Process cmd.exe -ArgumentList "/c", "`"$bat`"" -NoNewWindow -PassThru 66$p = Start-Process cmd.exe -ArgumentList "/c", "`"$bat`"" -NoNewWindow -PassThru
65$null = $p.Handle # keeps the exit code readable after WaitForExit 67$null = $p.Handle # keeps the exit code readable after WaitForExit
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index 2270ebe59..5923d8b70 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -548,7 +548,7 @@ OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_transl
548# Shaders a selected test draws with, built even when the filter leaves them out (#192). 548# Shaders a selected test draws with, built even when the filter leaves them out (#192).
549DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm", 549DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm",
550 "ps_texture_sample_d16": "vs_ids.asm", "ps_sample_c_lz": "vs_ids.asm", "ps_sample_c_lz_a16": "vs_ids.asm", 550 "ps_texture_sample_d16": "vs_ids.asm", "ps_sample_c_lz": "vs_ids.asm", "ps_sample_c_lz_a16": "vs_ids.asm",
551 **{name: "vs_ids.asm" for name in TEXTURE_CONSTANTS}, "ps_ssharp": "vs_ids.asm", 551 **{name: "vs_ids.asm" for name in TEXTURE_CONSTANTS}, "ps_ssharp": "vs_ids.asm", "ps_imgatomic": "vs_ids.asm",
552 **{name: "vs_ids.asm" for name in GRADIENT_TESTS}, "vs_clip": "ps_clip_color.asm", 552 **{name: "vs_ids.asm" for name in GRADIENT_TESTS}, "vs_clip": "ps_clip_color.asm",
553 "ps_interp_f16_high": "vs_f16_pack.asm", "ms_f16_pack": "ps_interp_f16_high.asm", 553 "ps_interp_f16_high": "vs_f16_pack.asm", "ms_f16_pack": "ps_interp_f16_high.asm",
554 "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm", 554 "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm",
@@ -1043,10 +1043,12 @@ def run_suite(a, work: str) -> int:
1043 else: 1043 else:
1044 results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else 1044 results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else
1045 f"{bad} pixels differ from {expected}: {msg.splitlines()[-1] if msg else ''}")) 1045 f"{bad} pixels differ from {expected}: {msg.splitlines()[-1] if msg else ''}"))
1046 elif name == "ps_tex": 1046 elif name in ("ps_tex", "ps_imgatomic"):
1047 # A texture through the descriptor hash table and the bindless set. vk_bindless_test compares the 1047 # A texture through the descriptor hash table and the bindless set (ps_tex), or image atomics in a pixel
1048 # pixels itself, and exits 77 where the device lacks a feature the set or the shader needs. 1048 # shader through the set's r32ui storage arrays (ps_imgatomic, drawn with vs_ids). vk_bindless_test
1049 rc, msg = run_cmd([vk_bindless, vs_tri, spv]) 1049 # compares the result itself, and exits 77 where the device lacks a feature the set or shader needs.
1050 vs = os.path.join(spirv_dir, "vs_ids.spv") if name == "ps_imgatomic" else vs_tri
1051 rc, msg = run_cmd([vk_bindless, vs, spv])
1050 lines = msg.splitlines() 1052 lines = msg.splitlines()
1051 if rc == 77: 1053 if rc == 77:
1052 reason = next((ln for ln in lines if ln.startswith("unsupported:")), "unsupported device") 1054 reason = next((ln for ln in lines if ln.startswith("unsupported:")), "unsupported device")
@@ -1111,6 +1113,8 @@ def run_suite(a, work: str) -> int:
1111 "ps_vcmpx_forms": (0xF05B2A48, 0xF05E8A12, 0xB174BE18, 0x15550000), # 14 v_cmpx forms (.asm header) 1113 "ps_vcmpx_forms": (0xF05B2A48, 0xF05E8A12, 0xB174BE18, 0x15550000), # 14 v_cmpx forms (.asm header)
1112 "ps_med3_mods": (0x3F800000, 0x40400000, 0x40C00000, 0x3F400000), 1114 "ps_med3_mods": (0x3F800000, 0x40400000, 0x40C00000, 0x3F400000),
1113 "ps_scc_minmax": (0x00030205, 0x00030207, 0x00030209, 0x00030203), 1115 "ps_scc_minmax": (0x00030205, 0x00030207, 0x00030209, 0x00030203),
1116 "ps_scc_logic32": (0x0fff0fff, 0x000f000f, 0xf00ff00f, 0x36),
1117 "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16),
1114 "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000), 1118 "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000),
1115 "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64 1119 "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64
1116 # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers) 1120 # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers)