The export stages write .obj models, .glb chunks, .ogg Opus and .wav PCM
straight from the package, but .gitignore and the No Game Data check only
named the archive, shader and texture types. A run pointed inside a checkout
could leave those untracked and get them staged; the check would also miss a
force-added one, along with .r9modeldata and .msixvc that .gitignore already
covers.
The bvh and navmesh examples also wrote their index reports into the working
directory, which puts game-derived JSON and CSV in the tree; point them at
<temp> like the movies note does.
Verified with git check-ignore on every new pattern and by matching sample
filenames against the workflow regex. Docs and ignore rules only.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
Explicit-LOD gathers use four texel fetches that bypass the Vulkan sampler. Decode its 4.8 LOD bounds before selecting the mip so clamped gathers agree with a sampler-backed draw.
Measured on an AMD Radeon RX 6800 (gfx1030) with the hw-oracle tool from the
AnyPS5 project, all four IEEE/DX10_CLAMP combinations, wave32 and wave64:
- v_min/v_max f32/f16, each half of v_pk_min/max_f16, and v_min3/v_max3 now
emit NMin/NMax (one NaN operand gives the other) instead of FMin/FMax.
- v_med3_f32/_f16: FClamp(z, NMin(x,y), NMax(x,y)), and with OpIsNan of each
operand that can be a NaN, select NMin(NMin(x,y), z) (hardware: min3 when
any operand is NaN). Non-NaN constants get no check; no select when none.
- v_fract_f32: Fract, then 1.0 -> 0x3f7fffff by compare and select (the NaN
of fract(+-inf) is kept). v_fract_f16: the same, then a packed 0x3c00 ->
0x3bff (not after an output multiplier).
Other FMin/FMax/FClamp uses (clamp bit, LOD and conversion clamps) are
unchanged. GPU fixtures ps_fnan_med3 and ps_fnan_fract read their inputs
from memory; on the RX 6800 the two med3 words differed before this change.
tests/semantic/test_float_nan_fract.py runs the measured rows; both
interpreters gain NMin/NMax, and spirv_mini_interp OpIsNan and exact Fract.
tests/semantic/test_alu_med3.py (merged after this branch was cut): its float
reference used Python min/max, which return the first argument for equal
zeros. Hardware orders -0 below +0 (RX 6800: med3(-0, +0, 1.0) = +0,
med3(+0, -0, -1.0) = -0 in every operand order), so the reference now sorts
with that order, and spirv_mini_interp's FMin/FMax/FClamp order zeros the same
way as its NMin/NMax.
Rebased onto 8df277f. Two upstream tests were written against the old
behaviour and are updated: tests/semantic/test_valu_f32_min3_max3_mad.py
(its min3/max3 reference used first-operand order for mixed zeros, and its
negative control replaced FMin/FMax; now -0 < +0, as measured on the RX 6800,
and the control swaps NMin/NMax) and tests/semantic/test_valu_f16_round.py
(it asserted that the interpreter rejects Fract; it now asserts the value).
Upstream had added an OpIsNan/OpIsInf branch to spirv_mini_interp, so this
commit's own OpIsNan branch is dropped (it shadowed upstream's). docs/design.md
notes that an output modifier on v_fract_f16 is applied before narrowing to
f16, an order not measured on hardware.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Compatibility Pack lists Mesa's D3D12 layer as a second discrete GPU. The
harnesses now prefer a native ICD (#915), and LEONIDA_VK_DEVICE selects one
explicitly, so record both next to the other known problems.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
v_mad_u64_u32 and v_mad_i64_i32 write their 64-bit carry/sign output sdst (a[1]) via mask_dst in rdna2spirv.py, matching *_co_* vector carry ops, and shader_meta.py already groups them together. lane_masks.step() only checked '_co_' in op, causing whole-wave mask consumers (s_bcnt1_i32_b64, s_ff1_i32_b64, v_mbcnt) to treat sdst as plain per-lane data and produce divergent SGPR results (e.g. 64 in carrying lanes and 0 in non-carrying lanes).
Verified on CPU with tests/test_lane_masks.py, tests/semantic/test_alu_mad64.py (including 64-lane wave64 s_bcnt1_i32_b64/s_ff1_i32_b64 tests) and tests/semantic/test_wave64_scmp_masks.py.
docs/world.md and docs/world_names.md said ~96% of archetypeName hashes stay
unresolved. That was a name-source limit of the two sampled windows: the
names are in levels.rpf, and rpf9_names.py already lists them. With its
name.#dr/name.#ft list as the dictionary, 99.85% of the 1,670,435 placement
entities resolve (99.94% with --max-inflate 256 MiB), every match verified by
the entity's 64-bit key.
- world_index.py --archetypes-out writes the aggregate archetype file that
world_names.py resolve --archetypes reads (entity count and 64-bit key per
hash); nothing in the repo produced it before. Entities of a resource that
needs a continuation stream are counted once.
- world_names.py build --rpf9-names reads rpf9_names.py index JSON.
- docs: whole-archive coverage table, the four commands that reproduce it,
and the corrected statements in world.md and docs/README.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add nlg -> OpFUnordEqual (x == y or either source is NaN) to Gen.compare(), completing all 16 IEEE-754 RDNA2 VOPC float predicates (confirmed against LLVM gfx10_asm_vopc.s and RDNA2 ISA VOPC).
Verified on CPU with tests/semantic/test_float_compares.py (e32/e64 f32, f16 and v_cmpx_nlg) and tests/semantic/test_vopc_const_ordered.py.
Apply clamp_mods (mul:2/mul:4/div:2 then clamp to [0, 1]) in v_fmac_f16_e64 (before f16 narrowing, matching v_fma_f16 and keeping the high half intact) and in v_interp_p2_f32_e64 / v_interp_mov_f32_e64 (zero-instruction no-op when mods has none).
Confirmed against LLVM gfx10_asm_vop2.s (v_fmac_f16_e64 clamp/mul:2/mul:4/div:2) and gfx10_asm_vop3.s (v_interp_p2_f32_e64, v_interp_mov_f32_e64). Verified on CPU with tests/semantic/test_f16_fma_rounding.py, tests/semantic/test_interp_f32_mods.py, tests/semantic/test_interp_f16.py and tests/semantic/test_value_semantics.py.
Keep VOP3 FP source modifiers (neg(...), |...|, -|...|, abs(...), and nested combinations) as abs/neg flags on imm and fimm operands instead of applying two's-complement integer negation or folding outer '-' before FAbs, matching LLVM AMDGPUInstPrinter::printOperandAndFPInputMods.
Plain signed numeric literals (-1, -1.0, 0x10) keep their existing dict layout. Also handle -0x... inside modifiers, preserve abs on sext(...), and apply abs then neg in tools/shader_meta.py::_imm_u32.
Verified on CPU with tests/test_shader_ir.py, tests/test_shader_meta.py, tests/test_cpu_ref.py, tools/f32_fuzz.py and the full tests/semantic suite (1,027 tests).
The 1,009 levels.rpf rejects in the last shard are texture dictionaries,
not incomplete or duplicate tail pages, and 28 more in shards 1 to 7 are
models the probe caps reject. The 27 standalone models below c3708fb are
those capped models, not merged duplicates. Adds a per-archive table of
reject classes and links the upstream fixes (rpf9-explorer#9, #11).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds joaat names for 0x1E77BF4C (bumptex), 0xC6F46E79 (speculartex),
0x739E3D0D (speculartex2), 0x3FB7964F (tinttexture) and 0xC075F9B6
(lookuptexture), and a content check on a 1,500-model map sample: bumptex is
normal-map-like (1,394 vs 74), speculartex is not (69 vs 1,469). Notes the
conflict with the character table's 0xC6F46E79 row and three sRGB colour
parameters missing from ModelTextureBindings. Counts only.
AI-assisted (Claude). Measured on my own copy (1.0.2.1); docs only.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The address decoder already preserves the full offset VGPR before reading the packed coordinates. Let the existing offset path use those operands, and compare asymmetric packed UVs to the full-precision texel on the GPU.
In a partial wave, lanes that were never launched don't vote but their
bits are 0 in the mask, so the vote called vcc_hi = 0xff "all ones".
Keep the vote for 0 only; -1 goes through wave_mask(). GPU tests for a
40-thread wave64 and a 20-thread wave32.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 5.1 table only had the RTX 5080 run and listed AMD as open. Add the
RX 7900 XTX results for device_local, host_visible and host_device_local,
with the caveats that matter: the 100k table is 524,288 slots (20 MiB, 8
probes) here versus 2,097,152 on the RTX 5080, so rows are not comparable
across vendors, and the 10k host_visible path varied 147-845 net us/1M over
five runs, so its row is one representative run and the prose carries the
range. Numbers from #313/#166 at 2aed144.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
AI-assisted. docs/shader_validation.md said "Not covered yet: images", and
FUZZ-1..13 touch VALU, memory, LDS, crosslane and control flow but not a single
image instruction. This is the first slice of that gap:
- runtime/test/vk_image_fuzz.cpp: headless harness that binds one 2D sampled
image from a key=value spec (format, size, texels, T# key) through the
bindless set and the descriptor table, draws a 64x64 full-screen triangle with
a caller-supplied VS/PS, and dumps RGBA32F. It enables the without-format
storage-image reads/writes and fragment atomics the translated image path
declares, and fails on validation errors with LEONIDA_VK_VALIDATION=1.
- tools/image_fuzz.py: assembles a pixel shader that reads one texel with
image_load (dmask 0xf, T# in s[8:15]), translates it with rdna2spirv.py, runs
the harness, and compares every pixel with an independent CPU oracle for the
T# format. A fetch is a memory read, so the oracle is exact.
- tests/test_image_fuzz.py: the oracle, the texel mapping, the T# word and the
generated shader, without a GPU.
Covered: R8G8B8A8_UNORM, R16G16B16A16_SFLOAT, R32G32B32A32_SFLOAT and
R32_SFLOAT, at 8/16/32/64 square sizes that divide the draw; a fifth of the
values are NaN, +-inf, +-0 or denormals.
Not covered yet: dmask variants, UINT/SINT formats (they read through the
storage views), mips, 1D/2D-array/3D/cube, image_sample/gather with filters and
borders, and texel offsets with VK_KHR_maintenance8.
Verified on an NVIDIA RTX 2060 SUPER (Linux, 620.73.04, Vulkan 1.4.357):
40/40 programs match under LEONIDA_VK_VALIDATION=1; ctest 11/11; the GPU suite
is unchanged with a clean build. Synthetic fixtures only, no game data.