Commit Graph

46 Commits

Author SHA1 Message Date
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
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
6b101b24e2 Fail pipeline checks when shader modules or pipelines fail 2026-11-21 18:46:11 -07:00
8f3fc8bd3b CI: build Windows Vulkan/COM targets via Vulkan-Headers and add sccache 2026-11-21 21:27:42 -03:00
3ef8f4f6df CI: scope Runtime workflow by path, run Linux ctest, enable D3D12 shim test 2026-11-21 21:27:07 -03:00
49f4958a4b CI: run the GPU tests on Mesa llvmpipe
The linux-gpu-tools job built the GPU test programs but never ran them.
It now installs llvmpipe (software Vulkan), llvm-mc and SPIRV-Tools and
runs scripts/run_gpu_tests.py twice: natively (31 pass, 29 expected
skips: 8-wide subgroups, no fragment barycentrics) and the compute tests
with LEONIDA_W64_EMULATE=1 (33 pass). The emulated mesh tests are left
out because llvmpipe's compiler aborts on them. docs/testing.md gets a
section on running the suite without a GPU.

AI-assisted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D7JEiKsTUaHQbCTdc4Eghy
2026-11-21 23:39:29 +00:00
3cb99297cd Update checkout action versions in runtime.yml 2026-11-22 01:01:48 +03:00
711d386320 CI, tests, tools: fix file handle leak, skip without pytest, build GPU tools on Linux
- tools/awc_opus.py: wrap export_bank file read in a with-statement to
  close the handle promptly instead of relying on GC (fixes ResourceWarning
  seen in test output).

- tests/test_amd_swizzle.py: use raise unittest.SkipTest instead of
  import pytest; pytest.skip so the test works under both python -I and
  unittest discovery when numpy is absent. No pytest dependency needed.

- tests/test_d3d12_xs_surface.py: same treatment for the two conditional
  skips (Windows SDK headers, SCARAB_REF). The test still skips gracefully
  without pytest installed.

- .github/workflows/runtime.yml: add a linux-gpu-tools job that installs
  libvulkan-dev, builds all GPU test tools with cmake + ninja + g++, and
  verifies every tool binary exists. Rename the Windows job from 'build' to
  'windows' to disambiguate. This catches build regressions in GPU tool code
  that only manifest on Linux.

AI-assisted.
2026-11-21 21:10:01 +01:00
f20ea6dde8 Merge pull request #28 from Eremia Brinzoi Razvan Andrei 2026-11-21 12:26:30 -05:00
770c496630 Record full-view color clears and replay them on Vulkan 2026-11-21 19:20:39 +02:00
056dafe073 ci: bump the actions group with 3 updates
Bumps the actions group with 3 updates: [actions/checkout](https://github.com/actions/checkout), [actions/setup-python](https://github.com/actions/setup-python) and [actions/setup-dotnet](https://github.com/actions/setup-dotnet).


Updates `actions/checkout` from 4 to 7
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v7)

Updates `actions/setup-python` from 5 to 7
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v7)

Updates `actions/setup-dotnet` from 4 to 6
- [Release notes](https://github.com/actions/setup-dotnet/releases)
- [Commits](https://github.com/actions/setup-dotnet/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
- dependency-name: actions/setup-dotnet
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-21 16:59:35 +00:00
4a90f8678a CI: build the runtime with MSVC
Co-Authored-By: Claude <noreply@anthropic.com>
2026-11-21 14:13:52 +01:00