Commit Graph

60 Commits

Author SHA1 Message Date
bdf45c6030 Merge pull request #3954 from errusso
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:52 -05:00
7331c411ed Merge pull request #3870 from Jolymmiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:09:04 -05:00
853d13539b Merge pull request #3844 from ligmaSec
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:08:50 -05:00
5e2ea6cfa2 Merge pull request #3248 from 0xTehuti
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:07:05 -05:00
5987f76295 Merge pull request #2909 from Jolymmiles
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 23:06:23 -05:00
33905dc9dd Fix what the round-43 merges broke (pytest)
Merges that each passed alone but clash together:
- v_cmp_class_f64: the earlier cmp_class_f64 (685d16ed9) (operand-form checks, test_cmp_class_f64) and the later f64 branch
  in cmp_class both handled the opcode; f64 goes to cmp_class_f64 again, f16 stays in cmp_class.
- rdna2spirv CLI tests: spirv-as/spirv-val now run in the output folder with the staging file's bare name, so
  the test doubles resolve it against cwd; assemble_spirv decodes the output only when it is bytes. (The doubles
  had been writing .spirv-*.tmp files into the repository root.)
- ps_w64 fixtures (TEST-722): an 18th fixture (ps_w64_a_discard) landed; its killed lanes export nothing and
  keep the clear value.
- first_light: a run without an OBJ removes mesh.bin, and harness_env reads manifest["files"]; batch_glb's stats
  name failures and dropped textures; run_gpu_tests reports a frame never written as a missing readback
  (TEST-837).
- make_game TRANSLATION_SOURCES and runtime.yml's paths include spirv_opt.py and report_paths.py (and
  wave64_emulate_opt.py), which the translator imports.
Repo rules: stdout guard on six tools; encoding on two opens (gen_gdk_runtime_classes' helper is read_utf8);
newline on one write; anim_skeleton_match's joaat encodes like hashdict.joaat; test_feature_scan's new test is
listed with the others its globals() runner reaches.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:07:41 -05:00
291767e54f CI: verify llvm-mc amdgcn target and retain test compatibility notes (BUILD-923)
- In .github/workflows/runtime.yml, add a sanity check step ensuring /usr/lib/llvm-19/bin/llvm-mc has amdgcn target support after package installation.
- In docs/testing.md, retain the note that older llvm-mc (18+) supports valu_fuzz.py --family mem and lds_fuzz.py, while stock CI fixtures need 19+ and full f16 fuzzing requires 21+.
2026-11-23 01:00:15 +01:00
30023dcecd CI (linux-gpu-tools): fetch Vulkan headers to match the pinned release
The linux-gpu-tools job on ubuntu-24.04 uses the system's libvulkan-dev,
whose headers are too old for VK_KHR_pipeline_binary (vk_harness.cpp uses
VkPhysicalDevicePipelineBinaryFeaturesKHR unconditionally). Add the same
Vulkan headers cache + sparse checkout that the windows job uses and pass
VULKAN_SDK during configure, so the pinned vulkan-sdk-1.4.363.0 release
shadows the system headers.

This job was added in #144; the vulkan-headers cache step was left out.
2026-11-23 00:05:49 +01:00
0fdc443260 CI: upgrade linux-gpu-tools job to llvm-19 (BUILD-923)
In .github/workflows/runtime.yml, the `linux-gpu-tools` job pinned `llvm-18`'s
`llvm-mc`, which rejects the new `ps_sdwa_f16_const` fixture
(`v_cvt_f16_u16_sdwa v5, 1.0` inline float constant on an integer-source SDWA op)
introduced in d78546fc, causing scripts/run_gpu_tests.py to abort before
reporting GPU test results.

Upgrade the pinned assembler path from `llvm-18` to `llvm-19` across package
installation and the native & wave64 emulation test steps. Also update
documentation in docs/testing.md to reflect that llvm-18 rejects
ps_sdwa_f16_const and that llvm-19+ is required.

Claim: https://github.com/ItsNotRexed/Leonida/issues/3047#issuecomment-7084706031
Fixes: BUILD-923
2026-11-22 23:31:23 +01:00
f02e952272 CI: a macOS (Apple Silicon) job for the runtime on MoltenVK and the Python suites
runtime.yml gets a macos job on macos-26: Homebrew's MoltenVK, Vulkan headers and
loader, llvm-mc, SPIRV-Tools and glslang; the runtime built through sccache; ctest
and run_gpu_tests.py on MoltenVK. ci.yml gets macos-python: the standard-library
loop, the semantic suite alongside it, and the pytest files with Homebrew's llvm-mc.

The hosted runner's Metal device is Apple Paravirtual device (family Mac2), which
MoltenVK runs on; KosmicKrisp finds no device there. macos-15 can't build the
runtime (Xcode 16's libc++ has no floating-point std::from_chars).

The two tests that fail on MoltenVK today, also on an M3 Max, are listed with the
pull requests that fix them (xdxr_build_check: #2423, ps_ssharp: #1845);
scripts/ci_expected_failures.py fails the step on any other failure and notes an
expected one that passes.
2026-11-23 02:21:52 +04:00
f61a9968e3 CI: replace deprecated Node 20 ilammy/msvc-dev-cmd with vswhere + vcvars64.bat
ilammy/msvc-dev-cmd@v1.13.0 still runs on Node 20 and has had no releases
since January 2024, triggering the Node.js 20 deprecation warning on every
Windows Runtime run.

Set up the x64 MSVC developer environment directly in PowerShell via
vswhere.exe and VC\Auxiliary\Build\vcvars64.bat (matching
scripts/build_runtime.ps1), verify cl.exe and the x64 environment, and
export changed environment variables to GITHUB_ENV.
2026-11-23 02:09:15 +04:00
e75bb76734 Run Wine CI when the Windows artifact is available 2026-11-22 22:02:53 +00:00
d6354821a8 Merge pull request #2972 from Davide 2026-11-22 17:00:16 -05:00
cb9c81ef74 Merge pull request #2972 from Davide 2026-11-22 15:13:41 -05:00
aef623982c Merge pull request #2869 from Shrey Ratna 2026-11-22 15:12:43 -05:00
811a7831ad runtime.yml: a test keeps the path list in step with what the jobs read
tests/test_runtime_paths.py recomputes the tools/ files the Runtime jobs read (named by runtime/, the
workflow's steps and the scripts it runs, then sibling imports, modules and files named in strings, and
tools/ subdirectories, to a fixed point) and fails when one is not listed, when the push and pull_request
lists differ, or when a listed tool no longer exists. Without it, a new import in the translator would
leave the new module outside the list, and a later change to that module alone would skip the GPU tests.

.gitattributes joins the list: it decides the line endings of every file the build checks out.

docs/testing.md no longer says the llvmpipe suite runs on every pull request, and says that a commit on
main has a runtime-windows artifact only if it touched what the workflow builds or reads.
2026-11-22 20:23:43 +01:00
df208993b8 runtime.yml: the keep-list closes over imports and data files, not just the tools named by path
@Desamodeth's dependency check found three single-file changes that must keep triggering this workflow and that a
.py-only scan misses: `tools/gfx10_formats.json` (a table `rdna2spirv.py` loads, so `--help` fails without it),
`tools/lane_masks.py` (same) and `tools/mc_command.py` (imported by `scripts/run_gpu_tests.py`). My first list had
only the tools the workflow's files name *by path*, which is neither the full import closure nor the data files.

Recomputed with ast over the tools in that set, following sibling imports and the file names those tools load from
their own directory: 27 files plus the `hw_oracle` directory, instead of 11 files. Over-including costs a run on a
rare change; under-including silently loses the build for a tool the workflow reads, which is the failure this item
exists to prevent.

Checked: both path lists are 32 entries and identical, the jobs are unchanged, and the recomputation reports nothing
needed that is absent.
2026-11-22 20:01:28 +01:00
666a3f6996 runtime.yml: run on what the workflow reads, not on every tools/ change
`paths-ignore` cannot express "everything under `tools/` except the files the runtime reads", so the event now
lists what triggers this workflow instead: `runtime/**`, `third_party/**`, `scripts/**`, the workflow itself, and
the eleven `tools/*.py` that CMake, ctest and the job scripts call - `gen_d3d12_stubs.py` at configure time,
`xdxr_bvh.py` and `rdna2spirv.py` from CMake and ctest, `bary_fallback_gs.py`, `mesh_compute_vs.py` and
`vk_subgroup_info.py` from `scripts/run_gpu_tests.py`, and `shader_meta.py`, `spirv_stubs.py`, `cf_diff.py`,
`f32_fuzz.py` and `fssm_unpack.py` through those and their imports.

A tool-only pull request no longer starts a full Windows and Wine build it cannot break. The runner queue is
about 2,000 runs deep against 8 in progress, and each such run takes a slot that a change needing it could use.
`tools/first_light.py` and `tools/fspx_unpack.py` appear only in comments and in a test that skips without
`LEONIDA_FIRST_LIGHT_DIR`, so they stay out.

Checked: the file parses, both lists have 15 entries and are identical, and the jobs are unchanged. A comment in
the workflow says a new tool the runtime reads has to be added there. This pull request touches `runtime.yml`
itself, which is in the list, so it is also a live check that the workflow still triggers.

BUILD-856.
2026-11-22 19:59:55 +01:00
f1e8035314 CI: run the GPU suite on llvmpipe under the barycentric fallback
llvmpipe has no VK_KHR_fragment_shader_barycentric, so the native llvmpipe run skips ps_bary,
ps_uniform_branch and ps_scc_mask32, and nothing in CI drew a pixel shader through the --bary-fallback
geometry shader (tools/bary_fallback_gs.py). A third llvmpipe run sets LEONIDA_BARY_FALLBACK=1 and fails
unless every shader that got a fallback geometry shader passes, not just runs: a run where the fallback
builds no geometry shader, or one of them skips, is an error.

docs/testing.md: list the third run, and correct the f16 tests' line: with the f16 interpolation
fallback (on by itself without the extension) ps_interp_f16_high and ms_f16_pack run under the bary
fallback too, and natively on llvmpipe.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:32:22 +00:00
4ac33f7e88 Merge pull request #2648 from skankhunt42 2026-11-22 13:16:47 -05:00
90f399e953 Runtime: warn loudly (or fail) when CMake finds no Vulkan headers
Without Vulkan headers everything under if(TARGET Vulkan::Headers) is left
out: the D3D12 COM objects, the Vulkan D3D12 device in gta6rt
(LEONIDA_D3D12=vulkan) and most of ctest. The only output was a STATUS line
naming four test tools, so a build whose VULKAN_SDK never reached CMake ran
45 of 125 tests and reported "100% tests passed".

- runtime/cmake/vulkan_headers_missing.cmake: a WARNING that names what is
  left out and that CMakeCache.txt keeps the failed lookup.
- LEONIDA_REQUIRE_VULKAN=ON turns it into a configure error; both CI
  configures pass it, and scripts/build_runtime.ps1 does when VULKAN_SDK is set.
- tests/test_cmake_vulkan_missing.py runs the module with cmake -P and checks
  that CMakeLists.txt and CI use it; docs/testing.md gets a troubleshooting row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 18:41:47 +01:00
8ceb79d07a Runtime: D3D12 copy and compute queues on dedicated Vulkan queue families (D3D-21), on top of D3D-97's leases 2026-11-22 16:04:46 +01:00
b0c587ea27 Wine tests: ship generated test shaders and map the build checkout's drive
d3d12_compute, d3d12_draw, d3d12_r9g9b9e5_uav, d3d12_descriptor and d3d12_indirect_rt open their GLSL test
shaders through absolute paths compiled into them (LEONIDA_TEST_*_SPV, D:/a/Leonida/Leonida/runtime/build/
generated/*.spv). The runtime-windows artifact didn't carry generated/*.spv and Wine has no such D: drive, so
they failed under Wine (copy_file threw, exit 3, or the shader read failed).

The artifact now includes runtime/build/generated/*.spv, and run_wine_tests.py points the drive of
--windows-root at --root in the Wine prefix for the run (a dosdevices link to a scratch folder), leaving a
drive the prefix already has untouched and removing both links afterwards.
2026-11-22 17:15:41 +04:00
0f403730a4 Include occlusion shader fixtures in the Wine CI artifact 2026-11-22 18:47:50 +08:00
dabd806bb1 Merge pull request #1022 from AREA52 Agent 2026-11-22 05:07:49 -05:00
4388d97aaf Test async callbacks from a mapped guest executable 2026-11-22 01:41:43 -08:00
9360ec9ec0 Runtime: predicate byte-granular CopyBufferRegion on the GPU
Build on the full 64-bit predicate snapshots from #856. Replay predicated buffer copies through a storage8 compute helper, retain descriptor batches through timeline completion, and reject missing capabilities or active statistics queries before submitting work.

Validate byte offsets, high predicate words, bounds, skipped destinations and pending descriptor lifetimes with CPU checks, 180 native WARP comparisons and 64 gated/reused GPU submissions. The existing OPTIONS19 host-capability mismatch also reproduces on base 4a36bb1; no tests are disabled.
2026-11-22 05:28:28 -04:00
29345889be Runtime: capture full 64-bit predication values on the GPU 2026-11-22 04:34:35 -04:00
2d93239c82 Merge pull request #912 from nicolas 2026-11-22 01:37:55 -05:00
6164876b29 Merge pull request #1029 from Vonsek 2026-11-22 01:08:28 -05:00
97234e2c48 Merge pull request #1013 from Kevin Morales 2026-11-22 01:08:21 -05:00
7e8f537f5f ci: check the six current descriptor test shaders on Windows
The multisample descriptor test names its SPIR-V outputs after their compile definitions. Checking each expected file catches a missing variant and lets the Windows job proceed to CTest and the Wine handoff after a successful build.
2026-11-22 06:58:14 +01:00
f53fc3fa48 Merge upstream large-module scheduling with cache feedback 2026-11-21 22:56:39 -07:00
8b51490ea7 process: park game threads that end the run until the host exits
Under Wine before 11.2, gta6rt --run sometimes exited 0 although the game
ended with 1 (run_tiny_game_exit_code in CI's Wine 9.0 job: 13 of 64 runs).
end_run signalled the host and called ExitThread; the host's ExitProcess
could then send SIGQUIT to that thread while it was exiting, Wine counted
the thread out twice and the process ended with _exit(0). Upstream fixed
it by blocking SIGQUIT during thread exit (4a9bc42a, wine-11.2).

end_run now parks every caller while a run is in progress (the first one
after recording the code and signalling), so no game thread is mid-exit
when the host calls ExitProcess. This also fixes two threads calling exit
at once: the second one called ExitProcess itself, sometimes before the
first had stored its code, and ended the process with 0 on any OS.

CI requires run_tiny_game_exit_code again.
2026-11-21 22:40:56 -07:00
c3e8478142 Merge pull request #894 from matheuskshn 2026-11-22 00:33:02 -05:00
53d2c6126b Report application-cache feedback for compiled Vulkan pipelines 2026-11-21 21:22:43 -07:00
0e191881e2 Merge pull request #846 from Ayoze Torres 2026-11-21 23:15:32 -05:00
8f72e5cea5 CI: compile D3D12 test shaders on Windows 2026-11-22 01:13:52 -03:00
9e9138829a CI: run the Wine job on WineHQ stable as well as Ubuntu's Wine
A matrix entry installs winehq-stable from WineHQ's repository next to
Ubuntu's Wine 9.0, closer to what Proton users run. The job summary
names the Wine version (run_wine_tests.py --label).
2026-11-22 03:55:52 +00:00
1caaa5a8b8 CI: create the Wine prefix inside one X session, with a time limit
wineboot and wineserver -w now run in the same xvfb-run session. With
wineserver -w after xvfb-run had closed the display, the WineHQ 11.0
job once waited in that step until the job's 20-minute timeout.
2026-11-22 03:55:17 +00:00
55d02a5861 Merge origin/main into d24-on-d32
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:48:46 +01:00
0db0d72dc7 Merge origin/main into d24-on-d32; follow main's depth-plane T# rule (D3D-75)
Main's depth-plane SRV T# code follows the texture's backing format (X24_8_32_FLOAT
where D24 is stored as D32), so the override from f9addf5 is dropped and the
D24 comparison test expects the backing format's code. The family refusal and
bind_image are main's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 04:45:53 +01:00
bbbed2e097 CI: use deny-list path filtering in Runtime and generalize test discovery 2026-11-22 00:32:31 -03:00
0251789a8b Merge remote-tracking branch 'origin/main' into d24-on-d32
# Conflicts:
#	runtime/src/vulkan_backend.h
2026-11-22 04:10:13 +01:00
0925302871 Merge pull request #747 from Ayoze Torres 2026-11-21 22:08:26 -05:00
734fe50e30 CI: don't require run_tiny_game_exit_code under Wine
Under Wine the process now and then exits 0 although gta6rt prints
"game exited with code 1" and calls ExitProcess(1): 2 of 3 full runs on
current main, 0 of 160 standalone runs (Wine 9.0 and 11.0). It stays in
the summary table.
2026-11-22 03:00:17 +00:00
1511d2bff2 Merge pull request #747 from Ayoze Torres 2026-11-21 21:37:57 -05:00
40bb5e76ce Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	runtime/src/vulkan_replay.h
2026-11-22 03:20:16 +01:00
0e63a76da0 D24 conversion: predication, large copies, tests, spec note (review)
- A dispatch honours conditional rendering and the layer's copies do not, so a
  SetPredication that skips copies also skipped the D24 conversion while the
  copy ran. Conditional rendering is ended around the dispatch and begun
  again; a test runs an upload and readback under a skipping predicate and
  compares with the host's unpredicated run (it fails without the fix).
- A copy larger than maxStorageBufferRange (queried; 128 MiB assumed if not)
  is split into dispatches by slices, or by rows of one slice; the descriptors
  bind 256-byte-aligned windows of both buffers. depth24_convert_test splits
  the 4096x4096 copy with a 1 MiB range and a pitched one with a 1 KiB range.
- make_pipeline destroys the layouts it made when a later step fails.
- depth24_convert_test is in the CI tool list; the docs say which GPU each test
  exercises.
- R24G8_TYPELESS with a typed D24 DSV is compared with the host. SRVs of
  R24_UNORM_X8_TYPELESS and X24_TYPELESS_G8_UINT are an empty slot in the
  layer (no format mapping; stencil-plane views refused): reported by the
  test and documented as a known gap.
- depth24.h: the D3D11.3 spec's FLOAT -> UNORM wording (3.2.3.6, 3.2.2) next to
  what WARP and AMD were measured to do; "159" is 5215.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:15:13 +01:00
c86977584a CI: run the Windows runtime tests under Wine on Linux
The Windows job uploads its executables, DLLs and the CTest list; a new
wine job runs them with scripts/run_wine_tests.py on ubuntu-24.04
(Wine, Xvfb, llvmpipe). The loader tests and gta6rt --run tiny_game must
pass; the other tests are reported in the job summary.
2026-11-22 02:13:39 +00:00