`s_absdiff_i32`/`s_mul_hi_i32`, `s_lshl1..4_add_u32` and the 64-bit scalar
data ops came from the ISA pseudocode and were only CPU-checked, so a reader
could not tell a measured rule from a transcribed one. Each instruction now
has the words a real part returns, including the two SCC cases the pseudocode
calls out: a bit shifted out of S0, and a wrapped |difference| of -2^31.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
The game's translated RT shaders read the console's XDXR records, which a
VkAccelerationStructureKHR is not (docs/d3d12_vulkan.md 4.8). The standalone
Vulkan device now builds them with src/xdxr_build.h, unless LEONIDA_RT_AS=khr
keeps #743's KHR builds (the proposal in the maintainer decisions of #1548).
- VulkanDeviceInfo::xdxr_acceleration_structures; the standalone device sets
it with bufferDeviceAddress and then leaves the KHR extensions off, so
acceleration-structure buffers keep their console VAs.
- VulkanContext owns an XdxrBuilder; replay checks the inputs while the list
is prepared (R32G32B32/R32G32 vertices, none/R16/R32 indices, addresses,
counts) and records the build with heap_base added to every VA and as the
bias for instance BLAS addresses.
- GetRaytracingAccelerationStructurePrebuildInfo answers from XdxrLayout,
exactly; an update rebuilds, so it needs the same scratch.
- The geometry's vertex format is mapped per DXGI format (an unknown one is
refused instead of read as R32G32B32), and its D3D12 flags reach the build.
- test/d3d12_xdxr_rt_test.cpp: a two-geometry BLAS (a soup; an R16-indexed
grid with stride 16 and a transform) and a TLAS of three instances through
the D3D12 API; ctest d3d12_xdxr_rt + d3d12_xdxr_rt_check.
- tools/xdxr_bvh.py: check-build compares TLAS hits by (geometry, primitive),
and skips (77) when the build step wrote no cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
List the B8G8R8X8 formats under what the Vulkan device implements: BGRA8 images whose
shader views read alpha as 1, a typeless family of their own, and no typed UAV, as on
the host runtime.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
global_store_byte/short[_d16_hi] and global_load_{u,s}byte_d16[_hi] /
global_load_short_d16[_hi] were rejected. They now go one byte at a time
at the global_* address: a store merges each byte into its dword with
atomic and/or (neighbours kept), a load reads each byte and inserts the
16-bit result into one half of vdst, keeping the other. A 16-bit access
crossing a dword is exact. The first-read analysis counts a d16 load's
vdst as read.
global_load/store_dword_addtid crashed with IndexError (no vaddr); they
now raise Unsupported. The address code moves to global_address, the
same change #1633 makes.
tests/semantic/test_global_sub_dword.py covers every byte offset 0-7 per
op, an inactive lane and the rejected forms. docs/design.md row added.
tools/user_sgpr_census.py (standard library only) reads spirv/index.json
(user_sgpr_reads from tools/shader_meta.py) and reports, per stage: the
lowest user SGPR read as a pointer, pointer width (ptr32_lo vs ptr64), the
distance between consecutive pointer SGPRs, how the SGPR after a 32-bit
pointer is read, and reads below a given stage base. --expect stage=sgpr
turns the result into a check.
docs/d3d12_vulkan.md 3.5: the measured counts next to the current packing
description. Physical SGPRs only; no packer change.
Tests: tests/test_user_sgpr_census.py builds both packing models by hand
and checks they are told apart, plus a failing --expect.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two i18n PRs merged as "both" left docs/README.md with two quickstart lines (test_i18n_index); #1551's link in
runtime/README.md pointed at runtime/runtime_imports.md instead of docs/ (test_docs_links).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Only and/or/andn2_saveexec and andn2_wrexec were translated; xor, andn1,
orn1, orn2, nand, nor and xnor_saveexec (b32/b64) and andn1_wrexec were
rejected. One table (Gen.EXEC_LOGIC, the definitions of tools/cf_ref.py
_SAVEEXEC) now gives f(S0, EXEC) for the whole family; the existing three
kinds emit the same code as before.
tests/semantic/test_saveexec_variants.py checks every lane's saved bit,
new EXEC and SCC against cf_ref._SAVEEXEC in wave32 and wave64; cf_diff
(300 programs x wave32/64) still passes. docs/design.md row added.
Confine music channel tables and payloads to their own chunks, accept short final chunks, and verify that a declared repeat matches whole packets from the same channel group. Metadata scans and exports now reject the same malformed descriptors while sibling streams still export.
Tested on Linux with synthetic banks. A three-chunk libopus example with repeated packets decoded to exactly the same 6,720 PCM samples as the reference. AI-assisted.
- 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>
v_pk_add/sub_u16/i16, v_pk_mul_lo_u16, v_pk_mad_u16/i16 and
v_pk_max/min_u16/i16 were rejected. Each result half takes its sources'
halves from op_sel / op_sel_hi, as the packed shifts do, wraps to 16
bits, and saturates under clamp (add, sub, mad). neg_lo/neg_hi and clamp
on the other ops are rejected; a constant reads as its low 16 bits, and a
constant whose high half op_sel would read (not measured for integer
ops) is rejected.
tests/semantic/test_alu_pk_int16.py covers value grids, op_sel, clamp,
constants and the rejected forms. docs/design.md row added.
v_mac_legacy_f32 came in with 58706b5b; llvm-mc accepts it for gfx1013 (v_mac_legacy_f32_e32).
The docs give the counts with the commit they were taken at, and the README row no longer
quotes numbers that every new rule changes. Reported by @josevictorp in #1562.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New stdlib tool on top of world_census.assemble and the world_index header
readers. Every field is read by member hash from each 0x7a resource's own
schema.
Lights: every CExtensionDefLightEffect reachable from the extensions list
of an archetype, interior archetype or entity, and its CLightAttrDef
lists. Counts per type, owner and resource kind, value ranges and checks.
With --entities (world_index.py --entities-out rows) archetype lights are
placed in world space through each map entity's transform, the same one
world_build.py --placements uses; --lights-out writes them (local only).
Lane graph: path nodes, links (lanes, flags, length) and junctions
(entrances, turns, traffic-light phases), with connectivity measured.
Full levels.rpf: 280,105 lights (450,195 placed through map entities),
63,808 nodes, 145,518 links, 1,546 junctions (369 signalised). The lane
graph equals SixNG's on every count; all 5,285 lights SixNG lacks come
from pool references at offsets 0x500..0x6ff that it reads as pointers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The bitonic sort padded the keys to a power of two and needed O(log^2 n)
dispatches, so one triangle past a power of two doubled its work (2.1 ms ->
5.2 ms at 262,144 -> 262,145 triangles on an RTX 3060, reported on #1572).
It is now a stable LSD radix sort: 8 passes of 4-bit digits over the 30-bit
Morton keys, each a count per 2048-element tile, one exclusive scan and a
scatter; 24 dispatches whatever the count, shared memory only.
- vk_xdxr_build_test: a 5000-triangle case (three sort tiles, the last
partial); stale cases from an earlier run are removed first, so a failed
build cannot be checked against old files.
- tools/xdxr_bvh.py: validate reports a leaf reached twice; a case may ask
check-build for fewer rays.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>