Commit Graph

591 Commits

Author SHA1 Message Date
dac28e6b19 Fix what the round-42 merges broke (tests and docs)
- 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>
2026-11-22 16:14:54 -05:00
c6341775fb Merge pull request #3321 from HAMADA 2026-11-22 15:16:57 -05:00
ddd45272ee Merge pull request #3317 from Hidrogen 2026-11-22 15:16:54 -05:00
23c3ccebd9 Merge pull request #3274 from 73N1X 2026-11-22 15:16:24 -05:00
237d590237 Merge pull request #3259 from Vyral1978 2026-11-22 15:16:16 -05:00
7cedefbe33 Merge pull request #3255 from KanameS 2026-11-22 15:16:15 -05:00
a09d690ca9 Merge pull request #3252 from Douglas Sposito 2026-11-22 15:16:12 -05:00
23b2e0e81d Merge pull request #2983 from TheHoracio 2026-11-22 15:13:48 -05:00
629f8350bf Merge pull request #2966 from Hossein Mortazavi 2026-11-22 15:13:38 -05:00
d4ed1754eb Merge pull request #2960 from 73N1X 2026-11-22 15:13:35 -05:00
65243b2811 Merge pull request #2951 from AlxcBTW
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:13:32 -05:00
09039457de Merge pull request #2948 from kapitche 2026-11-22 15:13:29 -05:00
0918318c72 Merge pull request #2937 from NiiRoZz 2026-11-22 15:13:21 -05:00
67ca0af7fc Merge pull request #2911 from Koro4e
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:13:05 -05:00
00b075e06c Merge pull request #2910 from Emma 2026-11-22 15:13:04 -05:00
3e08b678df Merge pull request #2871 from Koro4e
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:12:46 -05:00
32180661c1 Merge pull request #2823 from jsthope
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:12:22 -05:00
d5267d1b23 Merge pull request #2798 from itsRevela
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:12:08 -05:00
9de0ccc887 Merge pull request #2792 from RipcuBAN
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:12:03 -05:00
e138630254 Merge pull request #2772 from Nicolas Abosch 2026-11-22 15:11:49 -05:00
18234e1fcc Merge pull request #2728 from Størm 2026-11-22 15:11:31 -05:00
79a9ad8307 Merge pull request #2720 from sovljanskii 2026-11-22 15:11:29 -05:00
84524ba830 Merge pull request #2705 from Ayinaki 2026-11-22 15:11:27 -05:00
2236919f71 Merge pull request #2533 from mrp1no 2026-11-22 15:11:02 -05:00
bcfedd79ee Merge pull request #2473 from Vonsek
# Conflicts:
#	docs/README.md
#	docs/d3d12_vulkan.md
#	docs/embedded_shaders.md
2026-11-22 15:10:53 -05:00
5063e9cd80 Merge pull request #2069 from AlxcBTW
# Conflicts:
#	docs/d3d12_vulkan.md
2026-11-22 15:10:09 -05:00
45ffc82680 Merge pull request #1161 from woreksami 2026-11-22 15:09:38 -05:00
70b14257c0 docs/d3d12_vulkan.md: refresh the RTX 5080 D3D-56 descriptor-bench table on current main
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>
2026-11-22 22:04:35 +02:00
38df0fb43f d3d12: measure 96-bit resource tiling 2026-11-22 20:04:08 +00:00
15b4154142 Runtime: support conservative rasterization Tier 1 2026-11-22 15:57:00 -04:00
afd0d4c622 dxgi: IDXGIFactory6 and IDXGIFactory7 on the Vulkan factory (D3D-2)
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>
2026-11-22 20:55:41 +01:00
70e3acf459 Runtime: a bundle that sets viewports, scissors or render targets, or calls ClearState, fails its Close, as on D3D12
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>
2026-11-23 02:53:47 +07:00
867430739a docs: B8G8R8X8 castable-format lists in d3d12_vulkan.md (BUILD-768)
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>
2026-11-22 16:53:06 -03:00
57f5aec0a1 Tests: keep UNORM midpoint clears in WARP-only controls 2026-11-22 15:26:28 -04:00
e319015dc8 docs: merge the duplicate M3 milestone rows (PROC-139)
Keep the newer probe/isolation row and fold in the older row's synchronization-validation note. D3D-337's M2 fix is already in this branch.
2026-11-22 20:17:29 +01:00
0d5c799b77 Tests: separate WARP-only out-of-row UAV clear controls 2026-11-22 15:08:06 -04:00
bbcbe09371 sampler_lod_probe docs: the half-level gap is the Vulkan spec's rule, not the AMD host's
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>
2026-11-22 20:05:12 +01:00
c462f27ee7 sampler_lod_probe: measure the S# and T# LOD fields on RDNA2 (SHADER-539)
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>
2026-11-22 20:01:02 +01:00
5497864ff4 D3D-345: Document the T# image-key address range
Updated image key alignment and allocation details in Vulkan documentation.
2026-11-22 22:27:31 +03:30
22ed0b5179 Runtime: support short typed buffer UAV clears 2026-11-22 14:55:06 -04:00
4896856544 tests: d3d12_descriptor accepts a floored fractional image-view minimum LOD, which Vulkan permits 2026-11-22 13:51:04 -05:00
f12da53a58 D3D-329: measure where the descriptor-heap base reaches a heap-indexing shader
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>
2026-11-22 19:49:11 +01:00
d3b774eed5 PresentX planes: tone map shoulder, SDR white query off the present path, review fixes
- 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>
2026-11-22 19:45:00 +01:00
be6498f3cc Merge origin/main ec8ec4c9 into proc-129-open-questions
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>
2026-11-22 19:43:28 +01:00
839e14dc1e Tests: seven host comparisons take their hardware reference on the layer's own adapter
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>
2026-11-22 20:35:52 +02:00
80dd856a09 docs: drop the older cross-referencing BVH tally row
The newer row records the 42/52 re-measurement directly; the older row only pointed at section 4.8 and repeats the same claim one row below.
2026-11-22 19:33:48 +01:00
422b45cc08 docs: drop the superseded M2 milestone row
The M2 formats-test commit appended a fuller row with the 12-case CPU comparison; the original row above it is outdated.
2026-11-22 19:33:37 +01:00
9d621f3025 docs: drop the superseded open-question 16 row
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.
2026-11-22 19:29:34 +01:00
55a073183e d3d12: SetName is readable as WKPDID_D3DDebugObjectNameW, with the right GUID
@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>
2026-11-22 19:24:07 +01:00
2e5c9a9c43 Merge remote-tracking branch 'origin/main' into queue-wait-before-signal 2026-11-22 19:22:39 +01:00