diff options
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/audit_shader4_regs.py | 2 | ||||
| -rw-r--r-- | scripts/build_runtime.ps1 | 6 | ||||
| -rw-r--r-- | scripts/run_gpu_tests.py | 44 | ||||
| -rw-r--r-- | scripts/run_wine_tests.py | 2 |
4 files changed, 38 insertions, 16 deletions
diff --git a/scripts/audit_shader4_regs.py b/scripts/audit_shader4_regs.py index ac22c856c..6a6c449de 100644 --- a/scripts/audit_shader4_regs.py +++ b/scripts/audit_shader4_regs.py | |||
| @@ -371,7 +371,7 @@ def main(argv=None): | |||
| 371 | if a.json_out: | 371 | if a.json_out: |
| 372 | try: | 372 | try: |
| 373 | os.makedirs(os.path.dirname(os.path.abspath(a.json_out)), exist_ok=True) | 373 | os.makedirs(os.path.dirname(os.path.abspath(a.json_out)), exist_ok=True) |
| 374 | with open(a.json_out, "w", encoding="utf-8") as f: | 374 | with open(a.json_out, "w", encoding="utf-8", newline="\n") as f: |
| 375 | json.dump(rep, f, indent=2) | 375 | json.dump(rep, f, indent=2) |
| 376 | f.write("\n") | 376 | f.write("\n") |
| 377 | except OSError as e: | 377 | except OSError as e: |
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 7209c364c..025504fb8 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -25,7 +25,7 @@ sys.path.insert(0, os.path.join(ROOT, "tools")) | |||
| 25 | import mc_command # noqa: E402 | 25 | import mc_command # noqa: E402 |
| 26 | sys.path.insert(0, SHADER_DIR) | 26 | sys.path.insert(0, SHADER_DIR) |
| 27 | from build import CLIP_CASES, clip_container, shader_source | 27 | from build import CLIP_CASES, clip_container, shader_source |
| 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_sint32_test, fmt_xy_xyz_test | 28 | from check import Skip, clip_test, fmt_1010102_test, fmt_sint32_test, fmt_xy_xyz_test, tbuffer_store_test |
| 29 | from compute_fixture import compute_header | 29 | from compute_fixture import compute_header |
| 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) | 30 | from check import SAMPLER_CASES, sampler_test # ps_ssharp: the S#/T# mip fields (vk_sampler_test) |
| 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, | 31 | from check import (CMPX_CLASS_WORDS, CVT_F32_SAT_CASES, GRADIENT_TESTS, TEST_PROGRAMS, TEXTURE_MIP_DEPENDENCIES, |
| @@ -38,7 +38,7 @@ from check import gpu_test_timeout, timed_out # per-program time limit (LEONID | |||
| 38 | from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS | 38 | from check import MESH_COMPUTE, mesh_env # LEONIDA_MESH_COMPUTE=1: mesh shaders as compute + a generated VS |
| 39 | from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, | 39 | from check import (WAVE32_LANE_DUMPS, WAVE32_LANE_ENV, bitmask_perm_narrow_skip, narrow_subgroup_skip, |
| 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py | 40 | vcmpx_forms_narrow_skip, wave32_lane_skip) # as in check.py |
| 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem # pixel producers and checks | 41 | from check import PIXEL_VERTEX, interp_f16_high_problem, ij_computed_problem, mandelbrot_problem # pixel producers and checks |
| 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries | 42 | from check import GET_LOD_TESTS, STORE_WORDS, get_lod_test, store_words_problem # TEST-184: image atomics and queries |
| 43 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide | 43 | from check import wide_pixel_skip # ps_w64x_readlane: judged only where the fragment stage was required 64-wide |
| 44 | 44 | ||
| @@ -115,7 +115,7 @@ def assemble_to_s(llvm_mc: str, asm_path: str, s_path: str, name: str) -> None: | |||
| 115 | continue | 115 | continue |
| 116 | if ln.startswith("\t"): | 116 | if ln.startswith("\t"): |
| 117 | lines.append(ln) | 117 | lines.append(ln) |
| 118 | with open(s_path, "w", encoding="utf-8") as f: | 118 | with open(s_path, "w", encoding="utf-8", newline="\n") as f: |
| 119 | f.write("\n".join(lines) + "\n") | 119 | f.write("\n".join(lines) + "\n") |
| 120 | 120 | ||
| 121 | 121 | ||
| @@ -542,13 +542,15 @@ def check_clip_half(raw_path: str, want_b: float, want_a: float) -> tuple[bool, | |||
| 542 | OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_translated_draw_test", | 542 | OTHER_HARNESS = {"ps_m15": "d3d12_translated_draw_test", "vs_m15": "d3d12_translated_draw_test", |
| 543 | "ps_m2": "d3d12_m2_textured_test", "vs_m2": "d3d12_m2_textured_test", "ps_m2_uoff": "d3d12_m2_textured_test", | 543 | "ps_m2": "d3d12_m2_textured_test", "vs_m2": "d3d12_m2_textured_test", "ps_m2_uoff": "d3d12_m2_textured_test", |
| 544 | "ps_m3": "d3d12_m3_frame_test", "vs_m3": "d3d12_m3_frame_test", | 544 | "ps_m3": "d3d12_m3_frame_test", "vs_m3": "d3d12_m3_frame_test", |
| 545 | "ps_m3_post": "d3d12_m3_frame_test"} | 545 | "ps_m3_post": "d3d12_m3_frame_test", |
| 546 | "cs_m4_fill": "d3d12_m4_compute_test", "cs_m4_indirect": "d3d12_m4_compute_test", | ||
| 547 | "cs_buf_typed": "d3d12_buffer_uav_test", "cs_buf_counter": "d3d12_buffer_uav_test"} | ||
| 546 | 548 | ||
| 547 | 549 | ||
| 548 | # Shaders a selected test draws with, built even when the filter leaves them out (#192). | 550 | # Shaders a selected test draws with, built even when the filter leaves them out (#192). |
| 549 | DRAWN_WITH = {GATHER_LOD_TEST: "vs_ids.asm", "ps_flat": "vs_ids.asm", "ps_texture_sample": "vs_ids.asm", "ps_cube_sample": "vs_ids.asm", | 551 | DRAWN_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", | 552 | "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", | 553 | **{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", | 554 | **{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", | 555 | "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", | 556 | "ps_interp_f32_mods": "vs_interp_consts.asm", "ps_interp_mov_mods": "vs_interp_consts.asm", |
| @@ -839,6 +841,10 @@ def run_suite(a, work: str) -> int: | |||
| 839 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) | 841 | # TEST-185: xy/xyz format loads and stores, words measured natively on a Radeon 680M (the .asm header) |
| 840 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) | 842 | problem = fmt_xy_xyz_test(a.build, spirv_dir, cs_env) |
| 841 | results.append((name, not problem, problem or "128/128 dumped words exact")) | 843 | results.append((name, not problem, problem or "128/128 dumped words exact")) |
| 844 | elif name == "cs_tbuffer_store": | ||
| 845 | # tbuffer_store_format_*: the instruction's format, words measured natively on a Radeon 680M (the .asm header) | ||
| 846 | problem = tbuffer_store_test(a.build, spirv_dir, cs_env) | ||
| 847 | results.append((name, not problem, problem or "128/128 dumped words exact")) | ||
| 842 | elif name == "cs_global_neg_offset": | 848 | elif name == "cs_global_neg_offset": |
| 843 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte | 849 | # Negative global_load/global_store offsets (cs_global_neg_offset.asm): 40 groups give a 0x2800-byte |
| 844 | # heap holding both the right addresses and the 4096-lower ones. One thread, no wave64 requirement. | 850 | # heap holding both the right addresses and the 4096-lower ones. One thread, no wave64 requirement. |
| @@ -879,7 +885,7 @@ def run_suite(a, work: str) -> int: | |||
| 879 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", | 885 | "cs_w64x_lds_war", "cs_w64x_partial", "cs_w64x_sbarrier", "cs_w64x_load_ballot_load", |
| 880 | "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", | 886 | "cs_w64x_mask_reuse", "cs_w64x_mask_reuse2", "cs_w64x_chain_barrier", "cs_barrier_divergent", |
| 881 | "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end", | 887 | "cs_bpermute32", "cs_w64x_partial_scmp", "cs_w32_partial_scmp", "cs_barrier_early_end", |
| 882 | "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64"): | 888 | "cs_barrier_loop", "cs_w64x_andn2_exec", "cs_w64x_saveexec_b64", "cs_lds_b64_cmpst"): |
| 883 | cs_dump_wants = { | 889 | cs_dump_wants = { |
| 884 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], | 890 | "cs_store": [0x400080FF, 0xE00003FF, 0x3C004000, 0xEEEEEEEE, 0x40003C00, 0xBC003800, 0x40FF8000, 0x3FF00000], |
| 885 | # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone | 891 | # base + soffset + imm (cs_smem_soffset_imm.asm); out[4..7] are seeds the shader leaves alone |
| @@ -901,6 +907,9 @@ def run_suite(a, work: str) -> int: | |||
| 901 | "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], | 907 | "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], |
| 902 | # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) | 908 | # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) |
| 903 | "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], | 909 | "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], |
| 910 | # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) | ||
| 911 | "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004, | ||
| 912 | 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC], | ||
| 904 | # constant EXEC masks (cs_exec_const.asm): each lane takes its own bit of the constant | 913 | # constant EXEC masks (cs_exec_const.asm): each lane takes its own bit of the constant |
| 905 | "cs_exec_const": [16, 8, 2, 16, 0, 16], | 914 | "cs_exec_const": [16, 8, 2, 16, 0, 16], |
| 906 | # constant lane masks: lane L takes bit L (cs_w32_mask_imm.asm / cs_w64_mask_imm.asm headers) | 915 | # constant lane masks: lane L takes bit L (cs_w32_mask_imm.asm / cs_w64_mask_imm.asm headers) |
| @@ -969,7 +978,8 @@ def run_suite(a, work: str) -> int: | |||
| 969 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", | 978 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", |
| 970 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", | 979 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", |
| 971 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", | 980 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", |
| 972 | "cs_exec_const", "cs_w32_mask_imm", "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", | 981 | "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", |
| 982 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", | ||
| 973 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial | 983 | "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi") and not emulated and not partial |
| 974 | if partial and not emulated: | 984 | if partial and not emulated: |
| 975 | cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") | 985 | cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="64") |
| @@ -981,7 +991,8 @@ def run_suite(a, work: str) -> int: | |||
| 981 | ok, detail = None, str(skip) | 991 | ok, detail = None, str(skip) |
| 982 | else: | 992 | else: |
| 983 | ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, | 993 | ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, |
| 984 | hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16")) | 994 | hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", |
| 995 | "cs_lds_b64_cmpst")) | ||
| 985 | results.append((name, ok, detail)) | 996 | results.append((name, ok, detail)) |
| 986 | elif name == "cs_imgstore": | 997 | elif name == "cs_imgstore": |
| 987 | rc, msg = run_cmd([vk_store, spv]) | 998 | rc, msg = run_cmd([vk_store, spv]) |
| @@ -1042,10 +1053,12 @@ def run_suite(a, work: str) -> int: | |||
| 1042 | else: | 1053 | else: |
| 1043 | results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else | 1054 | results.append((name, rc == 0 and bad == 0, "4096/4096 pixels exact" if bad == 0 else |
| 1044 | f"{bad} pixels differ from {expected}: {msg.splitlines()[-1] if msg else ''}")) | 1055 | f"{bad} pixels differ from {expected}: {msg.splitlines()[-1] if msg else ''}")) |
| 1045 | elif name == "ps_tex": | 1056 | elif name in ("ps_tex", "ps_imgatomic"): |
| 1046 | # A texture through the descriptor hash table and the bindless set. vk_bindless_test compares the | 1057 | # A texture through the descriptor hash table and the bindless set (ps_tex), or image atomics in a pixel |
| 1047 | # pixels itself, and exits 77 where the device lacks a feature the set or the shader needs. | 1058 | # shader through the set's r32ui storage arrays (ps_imgatomic, drawn with vs_ids). vk_bindless_test |
| 1048 | rc, msg = run_cmd([vk_bindless, vs_tri, spv]) | 1059 | # compares the result itself, and exits 77 where the device lacks a feature the set or shader needs. |
| 1060 | vs = os.path.join(spirv_dir, "vs_ids.spv") if name == "ps_imgatomic" else vs_tri | ||
| 1061 | rc, msg = run_cmd([vk_bindless, vs, spv]) | ||
| 1049 | lines = msg.splitlines() | 1062 | lines = msg.splitlines() |
| 1050 | if rc == 77: | 1063 | if rc == 77: |
| 1051 | reason = next((ln for ln in lines if ln.startswith("unsupported:")), "unsupported device") | 1064 | reason = next((ln for ln in lines if ln.startswith("unsupported:")), "unsupported device") |
| @@ -1110,6 +1123,8 @@ def run_suite(a, work: str) -> int: | |||
| 1110 | "ps_vcmpx_forms": (0xF05B2A48, 0xF05E8A12, 0xB174BE18, 0x15550000), # 14 v_cmpx forms (.asm header) | 1123 | "ps_vcmpx_forms": (0xF05B2A48, 0xF05E8A12, 0xB174BE18, 0x15550000), # 14 v_cmpx forms (.asm header) |
| 1111 | "ps_med3_mods": (0x3F800000, 0x40400000, 0x40C00000, 0x3F400000), | 1124 | "ps_med3_mods": (0x3F800000, 0x40400000, 0x40C00000, 0x3F400000), |
| 1112 | "ps_scc_minmax": (0x00030205, 0x00030207, 0x00030209, 0x00030203), | 1125 | "ps_scc_minmax": (0x00030205, 0x00030207, 0x00030209, 0x00030203), |
| 1126 | "ps_scc_logic32": (0x0fff0fff, 0x000f000f, 0xf00ff00f, 0x36), | ||
| 1127 | "ps_scc_logic64": (0x0fff0fff, 0xff000000, 0xff0000ff, 0x16), | ||
| 1113 | "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000), | 1128 | "ps_fma_literal": (0x41B80000, 0x41800000, 0x40E00000, 0x41A40000), |
| 1114 | "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64 | 1129 | "ps_f64_mods": (0x40040000, 0x3FF00000, 0x3FE40000, 0x3FF00000), # needs shaderFloat64 |
| 1115 | # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers) | 1130 | # f16 op_sel / partial writes / inline constants: RDNA2 hardware words (see the .asm headers) |
| @@ -1168,6 +1183,11 @@ def run_suite(a, work: str) -> int: | |||
| 1168 | with open(raw, "rb") as source: | 1183 | with open(raw, "rb") as source: |
| 1169 | problem = ij_computed_problem(list(struct.iter_unpack("<4I", source.read()))) | 1184 | problem = ij_computed_problem(list(struct.iter_unpack("<4I", source.read()))) |
| 1170 | ok, detail = not problem, problem or "computed I/J pair words and v/2 within 1e-6" | 1185 | ok, detail = not problem, problem or "computed I/J pair words and v/2 within 1e-6" |
| 1186 | elif name == "ps_mandelbrot": | ||
| 1187 | with open(raw, "rb") as source: | ||
| 1188 | px = list(struct.iter_unpack("<4I", source.read())) | ||
| 1189 | problem = mandelbrot_problem(px) | ||
| 1190 | ok, detail = not problem, problem or f"{len(px)}/{len(px)} iteration counts match the float32 model" | ||
| 1171 | else: | 1191 | else: |
| 1172 | ok, detail = False, "no checker defined" | 1192 | ok, detail = False, "no checker defined" |
| 1173 | results.append((name, ok, detail)) | 1193 | results.append((name, ok, detail)) |
diff --git a/scripts/run_wine_tests.py b/scripts/run_wine_tests.py index b55ea9b91..0a02525e5 100644 --- a/scripts/run_wine_tests.py +++ b/scripts/run_wine_tests.py | |||
| @@ -251,7 +251,7 @@ def main() -> int: | |||
| 251 | if args.summary: | 251 | if args.summary: |
| 252 | try: | 252 | try: |
| 253 | _make_parent(args.summary) | 253 | _make_parent(args.summary) |
| 254 | with open(args.summary, "a", encoding="utf-8") as f: | 254 | with open(args.summary, "a", encoding="utf-8", newline="\n") as f: |
| 255 | f.write(f"### Windows tests under {args.label or 'Wine'}\n\n") | 255 | f.write(f"### Windows tests under {args.label or 'Wine'}\n\n") |
| 256 | f.write(f"{counts['pass']} passed, {counts['fail']} failed, {counts['skip']} skipped.\n\n") | 256 | f.write(f"{counts['pass']} passed, {counts['fail']} failed, {counts['skip']} skipped.\n\n") |
| 257 | f.write("| Test | Result | Required |\n|---|---|---|\n") | 257 | f.write("| Test | Result | Required |\n|---|---|---|\n") |