- shader_disasm: prune stale listings against every input, not the --skip-existing remainder (a resumed run
deleted every listing it had just reused).
- progress_dashboard: a drive-letter path is never inside the repository off Windows (it printed user names);
its own read_text helper is read_utf8, so the encoding check does not take it for pathlib's.
- Translator tests follow this round's rules: desc_lookup's BroadcastFirst in the typed-load condition walker;
resinfo sizes are 0 past the last level and a 2D depth word is 0 (SHADER-388); SHADER-315 constant folding in
the perm and i16 tests; #2089's structured wave64 emulation.
- test_semantic_translator_use: 57 oracle-only files merged before it are DEBT; test_spirv_tools_required is
allowed (CI meta-test).
- Test fixes: image_fuzz fake writes the programs, preflight follows c506d00c's loader hint rule, feature_scan
reads the first line of a pytest-decorated message, w64_graphics wording.
- docs: rows merged again in design.md, README.md, d3d12_vulkan.md; GameInput table rebuilt from #3172's rows;
orphan rows in models.md and embedded_shaders.md; repeated bullets; anchors; a flag not on main.
- Repo rules: stdout guard on 14 programs; LF writes; csv lineterminator in bink_play.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The RTX 5080 table in section 5.1 was measured before bc8e604's bounded slot
relocation, so its 100k row grew to 2,097,152 slots (4.8% load) and was not
comparable to the AMD RDNA3 table. Re-measured on current-main code (driver
621.24): 100k now settles at 524,288 slots / 19.07% load / max_probes=8, the
same geometry as the RX 7900 XTX and RX 9070 XT tables.
- replace the NVIDIA table with the refreshed numbers (device_local/ReBAR are
the median of 4 processes, host_visible one); link the raw CSV (#313).
- rewrite the three consequences (old point 3 recommended exactly the bounded
relocation bc8e604 since landed) and fix the AMD note and its point 4, which
still described the NVIDIA table as a different, non-comparable geometry.
- fix the section-5 perf summary's now-false "doubles to 80 MiB / 4.8%" claim.
Synthetic benchmark, no game data. AI-assisted; measured on an NVIDIA RTX 5080
(driver 621.24, Vulkan 1.4.357), Windows 11 Pro 26H2.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
CreateDXGIFactory2(IID_IDXGIFactory7) and QueryInterface for
IDXGIFactory6/7 failed on the layer's factory, which stopped at
IDXGIFactory5.
- EnumAdapterByGpuPreference returns the one Vulkan adapter at index 0
for every preference.
- RegisterAdaptersChangedEvent / UnregisterAdaptersChangedEvent keep a
cookie registry. The adapter list never changes, so the event is
never signalled.
Every return code follows the host dxgi.dll, measured on Windows 11
with an RTX 3070:
- a preference outside the enum is accepted;
- a null out is DXGI_ERROR_INVALID_CALL;
- past the end is DXGI_ERROR_NOT_FOUND with *out cleared;
- a non-adapter riid is E_NOINTERFACE;
- a null event or cookie, and an event registered twice, are
DXGI_ERROR_INVALID_CALL;
- cookies start at 1 and are separate from the occlusion cookies;
- an unknown cookie is DXGI_ERROR_NOT_FOUND.
dxgi_swapchain_test checks each answer. With main's factory it fails
at QueryInterface(IDXGIFactory6/7).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RSSetViewports, RSSetScissorRects, OMSetRenderTargets and ClearState had
no bundle check, so the layer accepted them in a bundle while the PC
runtime fails that bundle's Close (measured on an RTX 4060 Ti and WARP,
no debug layer). They now invalidate the bundle like the other calls a
bundle may not make.
New host-comparison test d3d12_bundle_forbidden: ten calls, each in a
bundle and, as a control, on a direct list, against the PC runtime on
the default adapter and WARP.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Say that a castable-format list naming the other family lets a view cross
B8G8R8X8 and B8G8R8A8, that the view's format decides the alpha and the
channel order, and that a typed B8G8R8X8 texture with unordered access
and such a list is still refused, where the host accepts it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Through vk_sampler_test (the runtime's vulkan_sampler(decode(S#)) path) an S# LOD_BIAS of +0.5 on image_sample_lz
reads level 1, as the console does, on a gfx1036 and an RX 7800 XT (AMD 26.10.1). So the AMD Vulkan driver rounds
like the hardware; only a host that follows the spec's ceil(lambda + 0.5) - 1 reads a level lower. Other hosts are
not measured.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/sampler_lod_probe.py samples a linear 64x64 R32_SFLOAT texture with seven levels through tools/hw_oracle,
with image_sample_l and image_sample_lz under the S#'s MIN_LOD / MAX_LOD / LOD_BIAS / MIP_FILTER and the T#'s
MIN_LOD and BASE_LEVEL. The texture memory is a dword ramp, so each sample names the level it came from; a
calibration row per level finds the level starts instead of assuming a layout.
On a gfx1036 (Radeon iGPU, AMD 26.10.1), 43 of 43 rows fit one model, wave32 and wave64 alike:
- the S# fields apply to an explicit LOD and to _lz's LOD 0 (bias, then the clamp), as radv assumes; MIP_FILTER
none ignores them;
- the T#'s MIN_LOD applies too, counted from the resource's level 0, not the view's BASE_LEVEL;
- the point mip filter's level is floor(lambda + 0.5): an exact .5 rounds up (Vulkan: ceil(lambda + 0.5) - 1);
- the T#'s MIN_LOD clamps the fractional LOD before that rounding (VK_EXT_image_view_min_lod: floor(minLod)).
So the runtime's Vulkan sampler and view read one level lower on 8 of the 43 rows. Also measured: gfx1036 lays a
linear mip chain out smallest level first, rows padded to 256 bytes.
docs/d3d12_vulkan.md records the measurement in place of "not measured on RDNA2 here";
tests/test_sampler_lod_probe.py checks the descriptor fields and the model without a GPU.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tools/heap_index_census.py follows every descriptor-width scalar load back to
the SGPRs it starts from (entry SGPR, constant, loaded pointer) per stage and
SFI0 heap-indexing class, and prints counts only. Over the 1.0.2.1 corpus,
99.86% of 770,412 descriptor loads start from an entry SGPR used as a 32-bit
pointer, none from a loaded pointer; heap-indexing shaders add a base read
with a run-time offset, and the stride is compiled into the offsets.
docs/d3d12_vulkan.md records the result in section 3.4 and the direct heap
indexing bullet: user data for compute (COMPUTE_PGM_RSRC2 USER_SGPR), below
s32 for the graphics stages whose user count is not measured yet.
tests/test_heap_index_census.py covers it on hand-written listings and
containers (no game files).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Tone map: identity up to 0.8 of SDR white, extended Reinhard shoulder above it, continuous in value and slope, content
peak maps to 1.0 (SDR-range content is no longer darkened).
- The Windows SDR white level is read by a background thread (about once a second, only while HDR10 is in use);
PresentX reads an atomic. A failed query keeps the last good value; QueryDisplayConfig retries on
ERROR_INSUFFICIENT_BUFFER.
- LEONIDA_SDR_EOTF is case-insensitive, unknown or too long values are logged; setters are atomics; <cwchar> for wcscmp.
- Tests: eight-step HDR10 ramp with hand-calculated bytes, curve properties (monotonic, identity below the knee, peak 1,
slope continuity), HDR10 plane 1 over SDR plane 0 on HDR10 and SDR outputs, hand-calculated 50% overlay bytes, query cost.
- Docs 4.5: shoulder description, query cost, sources marked (KWin claim unverified, vkd3d-proton file partly read, the
measured 80 nits only covers the SDR fallback path).
- present_compose.inc rebuilt with glslc 2026.4 (reproducible, spirv-val clean).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep PROC-129's merged rows 19 and 20 and drop the copies reintroduced by
main. The open-questions table remains ordered and duplicate-free.
Co-Authored-By: Claude <noreply@anthropic.com>
d3d12_copy_xfmt, d3d12_depth_resolve, d3d12_fence_events, d3d12_indirect_zero,
d3d12_node_mask, d3d12_query_rules and d3d12_resource_desc created their hardware
reference with D3D12CreateDevice(nullptr), the default adapter, and did not read
LEONIDA_HOST_ADAPTER. On a PC with two GPUs the layer then ran on one GPU and the
host driver on the other.
runtime/test/host_adapter.h picks the adapter by the rule d3d12_copy_compare.h
already follows for d3d12_vulkan_device: the adapter LEONIDA_HOST_ADAPTER names
(a name that matches none fails the run; "warp" leaves the hardware pass out),
else the adapter behind the Vulkan device (deviceLUID), else the default adapter.
The tests print the adapter's name instead of "the default adapter".
Measured on a Ryzen 7 9700X iGPU (AMD 32.0.21042.62) next to an RTX 3070
(NVIDIA 610.74, the default adapter): d3d12_depth_resolve with the layer on the
Radeon set aside nine resolves as host quirks before and after, but four of them
were NVIDIA's ("D24S8 stencil as X24_G8"); against the Radeon's own driver the
four are D24S8 depth MIN/MAX. The other six tests print the same results against
either adapter.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The later row still says the runtime/console side is open; the row above it answers the shader side with the full 26,503-shader scan. One row per question.
@pwu2775-dev found on #2533 that the tests' WKPDID_D3DDebugObjectNameW was
mistyped ({4cca5fd8-921f-42c8-8599-d2866a3e5f7e}, the layer's old constant)
instead of d3dcommon.h's {4cca5fd8-921f-42c8-8566-70caf2a9b741}. Measured with
the right key, the host runtime does what D3D12 documents: SetName is
SetPrivateData with that key and the name with its terminator, GetPrivateData
reads it back (an empty name is a 2-byte entry), and the narrow key is not
touched. SetName(nullptr) faults in the host and leaves the name as it was.
So the name goes back into the private data, now under the right GUID, and the
separate name_ / debug_name() are gone. SetName(nullptr) answers E_INVALIDARG
and changes nothing. d3d12_private_data_test: 667 steps compared, 0 mismatches
(RTX 3060, driver 610.88); d3d12_debug_markers_test checks the name again.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>