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>
- 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+.
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.
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
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.
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.
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.
@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.
`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.
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>
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>
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.
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.
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.
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.
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).
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.
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>
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.
- 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>
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.