The runtime's standalone device (d3d12_vulkan_device.cpp) still took
"the first usable device, replaced by every later discrete GPU". #915
fixed that rule in the test harnesses because Mesa's Dozen (Microsoft
vendor 0x1414, "Microsoft Direct3D12 (<gpu>)") reports a discrete GPU, so
on a PC with the OpenCL/OpenGL/Vulkan Compatibility Pack the runtime
could run on the Vulkan-on-D3D12 wrapper while the tests used the native
driver. Even without Dozen, on a two-dGPU PC the runtime took the last
GPU and vk_test_device.h the first.
- runtime/src/vulkan_device_filter.h: vulkan_device_rank() (native over
Microsoft's layers, then discrete > integrated > virtual > CPU), with
the device type as an int so the header stays Vulkan-free.
- d3d12_vulkan_device.cpp: the first usable device of the highest rank.
- vk_device_pick.h: device_rank forwards to it (static_assert on the
VkPhysicalDeviceType values).
- d3d12_indirect_rt_test, dxgi_swapchain_test, vk_image_fuzz,
vk_sampler_test had the old loop and ignored LEONIDA_VK_DEVICE: they
now filter and rank like the rest, and an unmatched filter fails
instead of skipping.
- vulkan_device_filter_test: the rank order; docs/testing.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both commits of #1653 and #1656 landed by hand on main, which left the
Known-problems table with the implicit-layer row twice and three
overlapping overlay rows, and the validation paragraph saying overlays
ignore VK_LOADER_LAYERS_DISABLE=~implicit~ outright. Keep one
implicit-layer row and the overlay row that has @Rainmaker33's finding
(the loader ignores the variable only in an elevated terminal, and RTSS
adds STORAGE only while it runs), and correct the paragraph to match.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/README.md listed models.md, audio.md and rsc8_audio.md twice with
different text; keep the current row of each. docs/testing.md had the
RTSS/OBS overlay advice in four rows that partly contradicted each other;
keep the implicit-layer row and the newest overlay row (the elevated-terminal
cause), with OBS's layer named. The row test now covers both pages.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1653's first commit and #1656 both landed, leaving the Known-problems
table with the implicit-layer row twice and two overlapping overlay
rows, and the validation paragraph saying the overlays ignore
VK_LOADER_LAYERS_DISABLE=~implicit~. Per @Rainmaker33's loader log, they
only stay in when the terminal is elevated: the loader ignores
VK_LOADER_LAYERS_DISABLE with administrator rights, while each layer's
disable_environment switch still works, and RTSS adds the STORAGE usage
only while RivaTuner Statistics Server runs. Keep one implicit-layer row
and one overlay row that say so, and correct the paragraph.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From @Rainmaker33's review of #1653: VK_LOADER_LAYERS_DISABLE didn't
remove RTSS on their machine because the terminal was elevated, and the
loader ignores that variable with administrator rights (VK_LOADER_DEBUG=all
says so); a layer's own disable_environment switch still works there. The
STORAGE message also needs RivaTuner Statistics Server itself running.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vk_sync_validation_selftest records two vkCmdCopyBuffer into the same
bytes on vk_test_device.h's device. With LEONIDA_VK_VALIDATION=1 the
write-after-write hazard must be reported, and the same copies with a
transfer -> transfer barrier must not be. Without validation, or without
a Vulkan device, it exits 77 (ctest skip).
Synchronization validation can be off although the tests ask for it,
for example with VK_KHRONOS_VALIDATION_VALIDATE_SYNC=false, and every
other GPU test then reports 0 validation errors without having been
checked. This test fails in that case, and with the Khronos layer
missing. docs/testing.md gets a row in its known problems.
No runtime code changes, no game files. AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Document that RivaTuner (VK_LAYER_RTSS) and OBS (VK_LAYER_OBS_HOOK) stay loaded under VK_LOADER_LAYERS_DISABLE=~implicit~
- Document DISABLE_RTSS_LAYER=1 and DISABLE_VULKAN_OBS_CAPTURE=1 to eliminate false validation errors in xbox_present and present tests
- Note the layer disable variables in both the test running section and Known problems table
RivaTuner's VK_LAYER_RTSS adds STORAGE usage to the swapchain it hooks,
which gives validation errors only on machines with MSI Afterburner, and
on some setups it stays loaded under VK_LOADER_LAYERS_DISABLE=~implicit~
(@Rainmaker33's loader log). Each such layer has its own
disable_environment switch, which always works: name the RTSS and OBS
ones, where any other layer's is found, and how to see the inserted
layers with VK_LOADER_DEBUG=layer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A vk_compute_test from an older commit still runs every shader, so a newer
translator rule that the old program does not set up (the raw V# in pc[2..3],
which drops every store when stride is 0) shows up as the untouched 0xEEEEEEEE
fill on every compute test, indistinguishable from a translator regression.
Measured on an RTX 5090 / 621.24: main 99f99890 with an exe from earlier the
same day gave 69/141, every compute test on the fill pattern; rebuilt from the
same commit, 141/141.
Runs the same texel fetches as raw compute kernels on the AMD GPU through tools/hw_oracle/: a linear texture the
kernel carries in its own code (256-byte aligned, found with s_getpc_b64), a T# built in s[8:15] for the GPU's family
(hw_oracle/tsharp.py: GFX11 on gfx11xx, GFX10 on gfx103x/gfx10xx), image_load with every dmask for one texel per lane,
all four result registers stored and compared word for word with the CPU model. --oracle translator,hw runs both on
the same textures; --negative-control checks seven wrong models and a wrong T# FORMAT are caught. Exit 77 without the
tools. gfx1150 is RDNA3.5, not RDNA2: the docs say so.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MoltenVK compiles MSL with Metal fast-math on by default, and Metal then folds
an f32 compare of a NaN with itself: v_cmpx_eq/le_f32 on (NaN, NaN) give true
(ps_vcmpx_forms fails on every Mac). The MSL is byte-identical with fast-math
on and off, so it's Metal's compile option, not the translation; "on demand"
(2) doesn't help, 0 does.
runtime/test/vulkan_loader.h, which every Vulkan test program loads MoltenVK
through, now sets MVK_CONFIG_FAST_MATH_ENABLED=0 before loading it unless the
variable is already set. docs/design.md gets a contract row: fast-math off
doesn't remove the optnone NoContraction helpers (the cost part, @Jolymmiles)
and doesn't fix SHADER-182 (same valu_fuzz f16 mismatch either way).
Apple A18 Pro, macOS 26.6.2, MoltenVK 1.4.2: ps_vcmpx_forms 4096/4096 exact;
run_gpu_tests.py 85 pass/52 skip/2 fail -> 86/52/1 native, 114/23/2 ->
115/23/1 with wave64 emulation (the remaining failure is ps_interp_f16_high,
fixed by #1407); ctest 25/25 either way; semantic suite 1220 OK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted
check.py kills a GPU test program after 120 s and counts it as a failure;
LEONIDA_GPU_TEST_TIMEOUT changes the limit and 0 turns it off. The variable
was only visible in a code comment, so add the paragraph next to the
--filter/--work note in "Run them".
Docs only, no game data.
MoltenVK can't compile PerVertexKHR to MSL, so ps_interp_f16_high failed at
pipeline creation on every Mac. With --f16-interp-fallback every VS/mesh param
(and the --mesh-compute VS) also exports its two f16 halves decoded to f32,
low halves at location 29 - 2N and high halves at 30 - 2N, and a PS *_f16 read
takes them as ordinary smooth inputs. A producer skips halves that would land
on its own params; a PS whose half location is also an attribute is rejected.
The index records f16_halves on both sides.
tools/vk_subgroup_info.py reports per_vertex_inputs (false without
fragmentShaderBarycentric or on MoltenVK); make_game.py and run_gpu_tests.py
turn the flag on where it is false. Without the flag all 139 GPU-test modules
are byte-identical to main's, so NVIDIA/AMD keep the exact per-vertex path.
Apple A18 Pro, macOS 26.6.2, MoltenVK 1.4.2: ps_interp_f16_high passes, all
4096 pixels bit-exact; run_gpu_tests.py 84 pass/50 skip/1 fail -> 85/50/0
native, 112/22/1 -> 113/22/0 with wave64 emulation; ms_f16_pack passes through
--mesh-compute. Semantic suite 1194 -> 1203 OK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AI-assisted
fma_f16_odd multiplies with a NoContraction OpFMul, so v_fma_f16,
v_fmac_f16 and v_pk_fma_f16 return +0 for a -0 product plus -0 on
MoltenVK 1.4.2 (valu_fuzz seed 330: 49/50 with the two multiply
skips, 50/50 with SPIRV-Cross 300681bb). The skip recipe now names
all five ops, and the KosmicKrisp line gives the manifest path.
Review of #1338: the runtime-windows artifact holds Windows executables,
so say to use it on Windows or under Wine, note GitHub's 7-day expiry,
and use <unzipped runtime-windows> instead of a ~/Downloads path that
reads like Linux or macOS.
Council review: MoltenVK main at 5189f8de is affected too, the
translator claim is narrowed (SignedZeroInfNanPreserve is #664), the
counts carry their flags, and the known-problems row gives the
--skip-op and KosmicKrisp workarounds, both measured on an M3 Max.
MoltenVK 1.4.2's SPIRV-Cross lowers a NoContraction OpFMul to
spvFMul, which returns fma(l, r, T(0)). A -0 product plus +0 is +0, so
valu_fuzz --family f16 reports +0 where the model wants -0 on Apple
GPUs (#1203). The translator's SPIR-V is correct. SPIRV-Cross 300681bb
fixes the helper; MoltenVK main still pins its parent.
Record the cause and the A/B measurement in the translator contract,
and add the symptom with a workaround to the known problems in
docs/testing.md.
GLSL.std.450 Fma may be split into two roundings by a driver (Vulkan
environment: inherited from OpFMul followed by OpFAdd); RDNA2 v_fma_* round
once. --fma khr (default stays glsl) emits OpFmaKHR with capability FMAKHR and
SPV_KHR_fma and lists shaderFmaFloat32 in the index. Runtime device creation
and the vk_* test programs enable VK_KHR_shader_fma when present; cs_fma_fused
tests single rounding; the mini interpreter learns OpFmaKHR.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TEST-58/TEST-71 testers without VS2022 or CMake had no documented route
from the Runtime workflow's runtime-windows artifact to
scripts/run_gpu_tests.py. Add a short subsection: download the artifact
of the commit's run, unzip it, and pass the folder to --build;
build.py and check.py take the same folder as their second argument.
Repeats the same-commit rule the note above states.
Docs only, no game data, no CI change.
Measured on Windows 11 build 26300 with the 426023a script against the
48ad23f runtime-windows artifact: 28 false cs_* failures on both an
RTX 5070 Ti Laptop and a Radeon 610M. Either matching pair (48ad23f
script and artifact, or 426023a script and artifact) is clean, so the
failures are version skew, not a translator or driver bug.
TEST-58/TEST-71 testers without a compiler are likely to use a CI
artifact; say which commit it belongs to and to check that commit out.
Docs only, no game data, no CI change.