Intel's D3D12 driver reports a fixed WaveLaneCountMin/Max of 16 on its
integrated GPUs, where Vulkan reports the compiler's 8..32 range, so
compare_options1 failed on every Intel iGPU. Measured on Xe-LP: UHD 770
(32.0.101.6129) and Raptor Lake-S Mobile (101.7092). Discrete Arc keeps
the Vulkan range until TEST-57 measures it.
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.
find_cc() accepted only gcc, so a Windows contributor with Visual Studio (already required for the runtime)
got "hardware oracle unavailable: no MinGW gcc". hw_oracle.c builds cleanly with cl /O1.
- Order: LEONIDA_HOST_CC (gcc, or cl.exe / clang-cl), gcc on PATH or in C:\msys64, then on Windows a cl on
PATH (Developer shell), then the Visual Studio vswhere finds, through its vcvars64.bat in a .cmd script.
- cl's objects go to the oracle's work folder, its errors (on stdout) reach the Unavailable message, and the
temporary launcher name ends in .exe so cl doesn't append another one.
- Unit tests for the choice and the commands; docs/shader_validation.md says the runtime's VS is enough.
Checked end to end on an RX 9070 with no gcc and no cl on PATH: the launcher is built through vcvars64.bat,
salu_diff and crosslane_fuzz --oracle hw run with 0 mismatches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A PS-only geometry helper cannot recover primitive culling from the fragment interface. Use the declared VS array for an explicit pair so fully negative primitives are discarded on the fallback path.
Fetching an integer view through a float OpTypeImage violates the Vulkan draw contract even on drivers that return the expected bits. Reuse the typed fetch selection and pass the guest mip register to each branch.
Resolve real empty ordinary/binary occlusion queries into default-heap predicates at two offsets and check both operators. Add GPU high-word-only overwrites, captured-value preservation, same-address recapture and reset controls. Compare all destination bytes and predicate guards with literal expectations and native WARP; four paired recapture controls change exactly one 13-byte region.
RX 5700 XT with Vulkan validation and synchronization validation: all 16 query-to-copy cases plus 180 existing cases passed, zero validation errors. Native WARP-only controls also passed. Coverage intentionally excludes nonzero visible-draw occlusion counts.
Verify compute and transfer readback-stage collection, descriptor cleanup after failed submits and gated/reused batches. Extend binary and overlapping occlusion fixtures with independent destinations to check skipped-copy preservation and copying after predicate reset. Document the command-slot lifetime and queue integration.
Local RX 5700 XT validation: 180 exact WARP comparisons, 64 gated/reused copy submissions, both occlusion controls, 192 predicate captures, replay A-G and 1663 existing WARP readbacks passed. CTest: 59/60 active tests passed; the six stencil CopyResource mismatch reports exactly match the tested #856 baseline. Shader source and embedded SPIR-V match after Vulkan 1.2 validation.
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 RDNA2 buffer unit updates only the addressed components even on an out-of-bounds load. Clearing the last high half clobbers unrelated values held across an x or xyz load.
Main moved 426023a5 -> e7584c52 (10 PRs) while the first merge round was
being verified. Auto-merged clean; no overlap with the SHADER-177 guards.
Notable main-side additions kept: check_interpolation_modes() (#1239, an
orthogonal FSSM attribute-mode guard: it checks the attribute's declared
interpolation mode, ours checks the barycentric VGPR source), the new
tools/ps_interp_census.py, and further rdna2spirv changes (#1246, #1250,
#1253). Guards, copy-root tracking, and the #1214 high-half composition
are unchanged and re-verified against e7584c52.
Conflicts resolved:
- tools/rdna2spirv.py: kept interp_pair_src ahead of the *_f16 interp's
attribute() call and took main's attribute(..., half=...) with its
PerVertexKHR docstring (quackottu's #1214 high model, on main as
98f485f4): the I/J source guard and the high-half attribute read are
orthogonal — the guard checks the barycentric VGPR source, `high`
selects the attribute half. Both methods kept side by side.
- docs/design.md: kept our SHADER-177 contract row and main's updated
Pixel-shader interpolants row (both rows; main's adds #1214's
16-bit-interpolation parenthetical).
Also addresses review on #1224 (kapitche, Vonsek):
- per-op I/J roles: v_interp_p1* must read I (v0 or a copy rooted at v0),
v_interp_p2* must read J (v1 or a copy rooted at v1); swapped
p1(v1)/p2(v0) and both-v0 pairs are now refused. interp_copy_sources
tracks each copy chain's root; refusals name the register and the role.
- copy-source provenance (Vonsek measurement row 3): a copy only
qualifies while its source v0/v1 is itself unwritten up to the copy —
a copy of an overwritten v0/v1 carries a computed value, not the pair;
a write after the copy is fine (the copy saved the value; the corpus's
one copy PS, 7PS_RasterizeWaterVolumeExposedSurface_d0369bb7, is
exactly this shape and stays byte-identical).
- tests/semantic/test_interp_guards.py: 5 new tests mirroring the
measurement rows and the role/root rules (now 14). Direct v0/v1 reads
after an overwrite stay accepted — modelling that computed barycentric
is the separate provenance follow-up (#1218).
Verified: semantic suite 1153 OK; 200-shader corpus slice 200/200
translated + spirv-val, all 419 output files byte-identical to current
main (426023a5); the copy PS byte-identical to main.
Counts over the one GameShape__Data__LocationNameLoopkup document in
common.rpf: 2,318 locations, 1,358 interiors with 2,280 positions (all
inside the PAMH / region tint rectangle), 66 rivers, 409 roads; keys are
their own namespace. No names or keys.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
base_op stripped the _dpp suffix and the op ran as a plain move, so v_mov_b32_dpp quad_perm:[1,0,3,2] exported its own lane and still passed spirv-val. Implement the DPP16 controls (quad_perm, row_shl/shr/ror/share/xmask/mirror/half_mirror), DPP8 (dpp8 + fi), row/bank masks and bound_ctrl. A source lane that is out of range or inactive reads zero under bound_ctrl:1, otherwise the destination keeps its old value. Under --wave64-emulate the exchange goes through the workgroup buffer, like the other cross-lane ops. GPU-checked with cs_dpp*.asm on an RTX 3070.
vertex_types.py over the seven archives with target blocks (60,442 dense
blocks, 138.9M vertices): header words constant, tag 0x28 is signed int16
pairs (85x fewer edge wraps than unsigned), tag 0x26 slot 1 has an
alpha-like byte 3, and none of 19 normal encodings explains tag 0x21.
Counts only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No FSSM word stores SPI_PS_INPUT_ENA/ADDR (u16 scan of 0x00-0x138 over all
12,101 PS against the signature-reconstructed value). tools/ps_interp_modes.py
decodes the mode from the DXBC PSV0 input elements (DXIL::InterpolationMode,
mapped to the SPI_PS_INPUT_ENA pair bits per Mesa gfx103.json), cross-checks
the FSSM table flags (read-method bits 0/1/3/4) and the disassembly I/J
operands, and runs a census: all generic inputs are Constant or
perspective-centre Linear (zero centroid/sample/noperspective); SV_Position is
noperspective by D3D rule, interpolated through the parameter cache in only 4
PS; every shader reads a single barycentric pair (v0/v1, one v14 copy). 23
synthetic tests; decoder+census only, no translator change.
.motion +0x70 holds one 0x28-byte item per child: the child's duration, its
duration in the blend and a (child time, blend time) curve. On anim.rpf the
first float is bit-for-bit the named .clip's duration for all 111,948 children
that name a .clip there; 158,991 of 159,584 curves are the identity and 402 are
monotonic time warps.
The parameter node is at +0x138 (+0x58 = 1) or at +0x18 of the block +0x120
points at (+0x58 = 2). Type 3 (10,171 of 17,247) is one sampled axis: a name
hash, (sample index, value) items sorted by value, min and max. 10 of the 88
axis name hashes resolve to joaat32 names such as yawangle and speed.
Also documents that the unlisted-last-page recovery needs the page map in a
listed stream (whattheflop's review on #1174): no anim.rpf root and no
story000 clip dictionary has its page map in such a tail. A synthetic test
keeps that layout unresolved.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- own 'asm rej' column; any rejection outside the GFX11 table exits 2
- known deviation omod_neg_zero only where the omod was active
- omod wording/citations (SIFoldOperands.cpp, D30209), v_min_legacy_f32 is in no GFX10/11 part
- zero_inf probes so the DX9-multiply negative control is caught at small sizes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The FSSM pixel-input record's flags bits 0-1 hold the interpolation mode
(1 flat, 2 linear = perspective-center). Over the 12,101 PS of the 1.0.2.1
corpus they are 1 or 2 only, agree with the v_interp form the code uses in
every shader, and match PSV0's per-input InterpolationMode (linear or
constant; no centroid, sample or noperspective input). The FSSM holds no
SPI_PS_INPUT_ENA/ADDR word.
- fssm_header: interpolation_modes(), mode names, tally of PS modes.
- rdna2spirv: check_interpolation_modes() refuses a read position whose
mode disagrees or is 0/3 (rejects 0 of 12,101 PS; shard 0/12 output is
byte-identical to main).
- ps_interp_census.py: PSV0 + FSSM + disassembly census (stdlib).
- docs/design.md: contract row with method and counts.
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- register_samplers (main) and create_window_presenter (stack) both kept.
- Resource dtor: stack arena release + main deferred destroys.
- AS binding: main size/host_readable + stack console va.
- VulkanContext: main's lock split kept; stack arena/pipeline accessors
moved to resource_mutex_ (execute copies replay_ under its shared lock),
presenter lookups take it shared.
- README takes main wholesale; D3D-90 code and tests untouched.
A geometry shader becomes the last stage before clipping and must forward the producing vertex shader's clip array. Key an explicitly paired helper by the array length so distinct pipelines retain independent clip layouts.
Resolved along the lines in #291 (comment by ItsNotRexed, 2026-11-22 08:27):
- Default-heap buffers stay in the GPU address arena: a VA is an arena offset,
and every buffer's device address is heap_base + VA (upload and readback
buffers: device address minus heap_base, as before).
- Acceleration structures: a buffer created in RAYTRACING_ACCELERATION_STRUCTURE
state on a ray-tracing device stays out of the arena and keeps main's model,
its VA being the VkAccelerationStructureKHR's device address, so BLAS
addresses in TLAS instance descriptions are what Vulkan reads. It is
registered by that VA. BuildRaytracingAccelerationStructure turns build
inputs and scratch into heap_base + VA, and the arena gets the build-input
usage on ray-tracing devices. Resource keeps one va_ (gpu_va_/buffer_va_
removed).
- buffer_at keeps the size& signature; main's only caller (WriteBufferImmediate)
is the branch's version, and ExecuteIndirect resolves its buffers by id.
- ~Resource keeps arena_release and main's defer_destroy.
- Main's split context locks: pipeline registration and heap_base/zero page
take resource_mutex_ (prepare looks pipelines up under its shared lock);
VulkanPresenter takes resource_mutex_ shared, plus tracker_mutex_ while it
records the back buffer's transition.
- Standalone device: main's single instance-extension list and DXGI swapchain
enable; info.presentation follows the same swapchain/surface condition, so
create_window_presenter keeps working. Main's DeferredDeletionQueue,
calibrated timestamps and ray-tracing extensions are kept next to the
branch's presentation and feature enables.
- Command IR: Dispatch and Draw follow main's DebugMarker, ExecuteIndirect and
BuildAccelerationStructure in the variant.
STS_Config has four cloud layers with one shared 13-field set and six media
with a shared 9-field set; two of the five cloud flags match a layer name.
The weather CloudType is fractional, not a layer index.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The one time_data document has 13 samples with integer hours 0 to 22 in
increasing order, an easing type per sample, and a uw_tc_mod that resolves
to a modifier name; its region matches a keyframe region. Answers the
section's open question about the 13 sample times.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts in docs/d3d12_vulkan.md, runtime/CMakeLists.txt, check.py,
run_gpu_tests.py and test_shader_checks.py: main's versions with
vk_sampler_test, ps_ssharp and its checks added back (ps_ssharp is drawn
with vs_ids through DRAWN_WITH now).
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With --branches every SCC producer may be followed by a chain of 1..3
consumers (s_cselect_b32, s_addc_u32, s_subb_u32) or by s_cbranch_scc0/scc1
forward over the next 1..3 scalar instructions (one lane, no loops, no
nesting). Half the instructions are drawn from the SCC producers. Program
lines write a branch as "+N" instructions; the listing for the translator
carries the dword offset and ; encoding: placeholders of each instruction's
size (literal = 8 bytes), which place the branch targets. The reference
models the skip, the shrinker keeps skipped ranges consistent, and a
mismatch prints the real offsets. Default runs are unchanged so existing
seeds keep their programs; the hardware oracle refuses --branches.
8000 branch programs (8 seeds, max-ops 6/12/20, one with --bfe-any) match
on main. Also drops the stale "until #349 lands" note (#349 is merged).
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
python from the Python install manager (the WindowsApps alias) doesn't see folders other programs create under %LOCALAPPDATA% or %APPDATA%, so the old default made make_game.py report llvm-mc missing and the fuzzers stop with WinError 2 although LLVM_MC named the file. The default -Dest is now %USERPROFILE%\.leonida\llvm-mc, and the preflight explains an LLVM_MC that points into AppData.