Measured against the host D3D12 runtime (RTX 5070, driver 621.14) with
d3d12_vulkan_device_test's compare_invalid_arguments, five answers
differed:
- CreateRootSignature took a node mask other than node 0 (host:
E_INVALIDARG), took a DXBC blob passed with more bytes than its own
size (host: E_INVALIDARG), and answered a null output with E_POINTER.
The host answers a null output with S_FALSE before it looks at the
blob or the node mask.
- CreateQueryHeap answered an unknown type (past PIPELINE_STATISTICS1)
with E_NOTIMPL (host: E_INVALIDARG), and a null output with S_FALSE
(host: E_UNEXPECTED, after the description checks).
compare_invalid_arguments gets 30 "query heap:" and "root signature:"
cases. The root signature blobs come from the host's serializer.
d3d12_vulkan_device_test's own null-output check now expects
E_UNEXPECTED. Known query types this layer has no path for stay
E_NOTIMPL, and more than 32 root dwords stay refused (pack()).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/world_archetypes.py reads the archetype structs of CMapTypes resources
(CBaseArchetypeDef, CMloArchetypeDef, CTimeArchetypeDef) by member hash, the
way world_index.py reads CEntityDef: name, assetName, assetType, bbMin/bbMax,
bsCentre/bsRadius, lodDist, flags. It imports world_index and world_census and
changes neither, so it does not touch the lines #1981 changes.
--check-extents rebuilds each fully-defined map's entitiesExtents from the
transformed archetype boxes. In levels.rpf 8-9 GiB the conjugated quaternion
reproduces 616 of 827 rotated maps (median error 0.16 mm), the stored one 236
(0.63 m), and the extents are computed without the entity scale.
docs/world.md: the member table, assetType measured against rpf9_names.py
(1 = fragment, 2 = drawable, 3 = drawable-like, no crossover), and the two
extents checks. Synthetic tests only, no game data.
docs/text.md had "Language per table" open: the tables carry no
language field and each one's language was guessed from its text. In
data.rpf and story000.rpf every string table sits in one of 13 nested
RPF9 archives (9FPR at 4 KiB-aligned offsets), and each archive is one
language.
A table in a nested archive now takes the guess most of that archive's
tables share (xx left out), when it covers more than half of them;
otherwise, and outside nested archives, a table keeps its own guess.
Nested archives come from an .rpf source or from the archive an
rpf9_carve.py directory's index.json names. --tables gains `guess` (the
per-table guess) and `archive` (the nested archive's offset). Scan
keeps the guesses and resolves languages when tables or texts are read.
Measured (counts only): data.rpf 14,440 tables in 13 archives, 2,075
change; story000.rpf 15,831 tables in 13 of 436 nested archives, 849
change. xx, plain es and plain zh drop to 0 in both. Table in
docs/text.md.
tests: nested-archive detection, archive majority over strays and xx,
no majority keeps each guess, a carve directory end to end through its
index.json, and a source with no archive.
The +0x20 count is the only field that looked like a grouping unit, so it was tested against
every stream boundary reading on story000.rpf before being used: a directory is followed by one
non-directory stream in 16,128 of 16,977 cases regardless of the count, and the best page-size
reading matches 9,622 pages (56.7%). The boundary comes from the q38 table, so each page now
reports the streams that make up its resource and whether the declared count agrees with the
64 KiB units they occupy.
Measured on gfx1036 in #2204 (tools/image_query_probe.py): a 2D image's
depth word is 0, a 2D array's layer count is minified to
max(1, layers >> (BASE_LEVEL + level)), and past the last level width,
height and depth are 0. The translator wrote 1, the full layer count, and
queried OpImageQuerySizeLod past the view's levels (undefined).
Gen.resinfo_words now emits the hardware rule: the level is compared
unsigned with the level count, the size query uses level 0 when it is out of
range, and BASE_LEVEL comes from T# word 3 [15:12]. vk_texture_test's
stand-in T# gets BASE_LEVEL 0 to match its level-0 views. cs_resinfo expects
depth 0 and gains level 5 of five.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
XboxBvhBuilder.dll (1.0.2.1) only rejects or skips postbuild InfoType 0x10:
0xe6a0, called first by the batched export, fails the build with
E_INVALIDARG on any 0x10 desc, and the export's own postbuild loop skips
it (0/3 -> 0x1d540, 2 -> 0x1d7c0). Neither reads past InfoType, and none
of the package's 15 other DLLs names the type or an offline builder.
Record the RVAs and close the open question: the layout needs the
offline BVH builder, which is not in the package. RVAs only; nothing
from the DLL is reproduced.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Meteor Lake (Xe-LPG) hosts answer 8..32 while the D3D-121 rule pins 16..16 for every
Intel integrated GPU; keep the measured 16..16 pin on pre-Xe-LPG lines (Tiger Lake
regression-checked locally) and keep the Vulkan range on Xe-LPG+ device-ID ranges
(Meteor/Arrow Lake 0x7d40-0x7dc5, Lunar Lake 0x64a0-0x64b6).
Fixes D3D-280.
Add the salu_cmov_b64 group (14 cases) to tools/int_hw_probe.py so the
gfx1036 measurement in docs/design.md is reproducible, name the command in
the row, drop the pointer to the duplicate row, and point the salu_diff.py
comment at the design.md counts instead of a second number.
AI-assisted.
GFX10 A16 packs the unsigned texel position into one VGPR and the mip level into the low half of the next one. The existing typed fetches can consume these addresses for both ordinary and packed results.
- create_vulkan_device_standalone now enables VK_EXT_swapchain_colorspace when the loader has it (only the
test device did), so the HDR10 surface formats can be listed in the real runtime; xbox_present_test checks
the standalone path (device_has_swapchain_colorspace).
- Straight-alpha planes are bilinearly filtered on premultiplied colour and un-premultiplied after, so a
transparent texel adds no colour; the CPU model does it independently, plus a transparent-edge case.
Both found in review by Flyander.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- move the new notes after the list-setup paragraph instead of splitting it
- list the fourth slot-80 fallback (0x1d047, W = 0x8020) in the section 3.3a row and the bullets
- write the header as table[root] + ((count - 1) << 16)
- say what is read from the code (the slot-80 fallback) and what stays inferred (slot 80's meaning)
Measure MUBUF/MTBUF swizzled buffer addressing (V# SWIZZLE_ENABLE,
ADD_TID_ENABLE, INDEX_STRIDE, OOB_SELECT, multi-dword and typed
accesses, atomics, 32-bit offset wrap) natively on RDNA2 (gfx1036,
wave32 and wave64) via tools/buffer_swizzle_probe.py, and fix all six
observed silicon divergences in tools/rdna2spirv.py:
- idxen=1 ignores ADD_TID_ENABLE (both address and bounds).
- SWIZZLE_ENABLE=1 with idxen=0 and ADD_TID_ENABLE=0 stays linear and
OOB_SELECT 3 remains RAW.
- Multi-dword raw accesses step by +4*IS only in scratch-swizzle mode
(SWIZZLE_ENABLE=1, idxen=0, ADD_TID_ENABLE=1); indexed swizzle
(idxen=1) steps linearly by +4 bytes even across IS boundaries.
- Scratch-swizzle mode suppresses typed formats > 4 bytes (MUBUF/MTBUF)
and 8-byte buffer_atomic_*_x2 even under OOB_SELECT 2 (formats <= 4B
execute normally); indexed swizzle executes them linearly.
- OOB_SELECT 3 with active swizzle and stride != 0 checks
(index + soffset) >= num_records or off + payload > stride.
- off = uint32(voff + inst_offset) wraps at 32 bits before bounds
checking, while RAW mode 3 uint64(off) + uint64(soffset) does not.
Update semantic tests, cs_buf_swizzle fixture expectation (word 4:
0x5eed0028 -> 0x5eed000c), unit tests, and docs/design.md /
docs/shader_validation.md.
Preserve ordered records and expose file/include/setup views, with synthetic tests and counts from four complete archives. No game data included. AI-assisted.
- test_translate: #1904 caps structured depth at 16, so the #1993 dispatch-loop test lowers MAX_STRUCTURED_DEPTH.
- test_ctest_registration: skip-code scan ignores conditional returns.
- test_d3d12_stubs_generation: INCLUDE uses os.pathsep.
- docs/README.md: one Other languages line.
- first_light.py, make_game.py: LF text writes; stdout guard on three tools.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docs/bvh.md 3.1: u32@0x20 = 0x140 + 64 * totalSizeIn64BNodes, 271,627 of
271,627 streams. xdxr_build.comp wrote total_size / 64; the copy and
postbuild paths read the field as the whole size, and tools/xdxr_bvh.py
wrote and validated it the same way. Now the header writes total / 64 - 1,
MODE_COPY_AS and MODE_POSTBUILD use (field + 1) * 64, validate() and the
reference builder agree, xdxr_build.inc is regenerated (glslc 2026.4) and
d3d12_xdxr_rt_test reads the size the same way.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tools/texoff_probe.py samples a linear R32_SFLOAT texture whose texel holds its index (2D 64x64 for y, 3D 64x1x64
for z) with image_sample_lz_o through tools/hw_oracle on gfx1036, wave32 and wave64. All 15 rows fit the
translator's rule. tests/test_texoff_probe.py checks that each row with a negative field tells signed from unsigned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MoltenVK's vkGetDescriptorSetLayoutSupport compares every layout with maxPerSetDescriptors (1212, the limit without
argument buffers) and rejects even 1212 itself, although it creates and samples a 65536-image, 4096-sampler
update-after-bind set correctly (native repro; d3d12_descriptor_test under Wine with the set grown). On MoltenVK the
D3D12 device no longer asks it: size_bindings' per-type update-after-bind limits, which MoltenVK takes from Metal's
argument-buffer limits, decide, and the set grows to 65536 2D images and 4096 samplers on an M3 Max.
tools/smem_neg_probe.py runs the rows natively (tools/hw_oracle) on gfx1036, wave32 and wave64. s_load reads at the
64-bit signed sum, as the translator inferred. s_buffer_load does not wrap the sOFF + IMM sum at 32 bits: the
translator's register form already matched, but a sOFF known at translation time was folded and truncated to 32 bits
(sOFF 0xfffffffc + IMM 8 read +4). Both forms keep the 64-bit sum now; SmemHardwareRuleTests runs every row in both.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>