Review of #2111 (@matheuskshn): an explicit empty argument followed by a filename was accepted, because an empty
cache_path stood for both "not given" and "given as ''". A flag now records that the cache path was given, so a
second positional argument is always a usage error (exit 2), and the message quotes both values.
Tested: `vk_pipeline_check <dir> "" b.bin` and `<dir> a.bin b.bin` exit 2 with the message; one cache path still runs
(62/62 real compute modules, RTX 5070 Ti / 621.24) and writes the cache. No new warnings. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Handle IXNetworkingImpl2 query for class {37e56907-2f10-41e8-b72f-36edb185331a}.
- Return offline answers matching console behavior without network:
* Connectivity hint: networkInitialized=true, level=None (1), cost=Unknown (0).
* Port query and URL security queries fail with ERROR_NETWORK_UNREACHABLE.
* Async queries complete through XAsync with ERROR_NETWORK_UNREACHABLE.
* Correct ABI parameter order for AsyncResult:
(async, bufferByteCount, bufferByteCountUsed*, buffer*, information**).
* VerifyServerCertificate fails offline with ERROR_NETWORK_UNREACHABLE.
* Registration tokens are tracked without firing offline.
* IXNetworkingImpl2 extension methods return E_NOTIMPL.
- Update docs and tests in xgameruntime_test and tiny_gdk_load.
D3D12_FEATURE_SHADER_MODEL echoed a request of 0x52-0x5f back with S_OK.
No runtime defines a model there, and the host runtime refuses them
with E_INVALIDARG (RTX 5070, driver 621.14). Refuse them the same way.
Requests above 6.9 stay clamped to the layer's model, as newer runtimes
accept newer ones. Checked in d3d12_vulkan_device_test's main, not
against the host: the test notes the host crashed on 0x5f elsewhere.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#1877's IXErrorImpl slot 3 returned void, but xgameruntime-docs gives
HRESULT WINAPI XErrorReport(HRESULT status, const char* message), so a
caller that checks the result read whatever was left in rax. It now returns
S_OK after reporting. Slot 5 matches Microsoft's void XErrorSetOptions(
XErrorOptions, XErrorOptions) instead of returning an HRESULT nobody reads
(XErrorSetCallback was already void). The test checks slot 3's S_OK.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
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>
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.
Review of #2111 (@Pipodi): the in-flight table got its entry only just before vkCreateComputePipelines /
vkCreateGraphicsPipelines, so a thread busy in vkCreateShaderModule (or a large module there, alone behind
compile_gate) was invisible: the watchdog never named it, and --inflight-file couldn't name a module that died there.
- The entry is made once the worker holds compile_gate, before vkCreateShaderModule, with phase "module"; it becomes
"pipeline" when the pipeline is created, and is removed on every path out of the loop (a pipeline, a skip, a failed
module). A module over --large-module-bytes writes the file when it enters the driver, not only at its pipeline.
- --inflight-file lines are "name<TAB>phase"; make_game.py reads the name.
- The watchdog says "still creating the shader module of X" or "still compiling X".
Waiting on compile_gate is not in the table: that thread isn't in the driver.
Tested on Windows 11 Pro 25H2, MSVC 14.51 + Ninja, RTX 5070 Ti / 621.24: the crash end-to-end through
make_game.pipelines on 62 real compute modules (skipped, the other 61 checked); the in-flight file at a simulated
crash reads "<module>\tpipeline" and is empty after a clean pass (62/62). tests/test_make_game_pipelines.py writes the
tab format; all 14 test_make_game*.py files pass. No new warnings. No game data. AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- 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>
Only copy the mapped capture buffer after a successful fence wait. Inject a failure in the synchronization test and verify that the caller's pixel and metadata outputs are unmodified.
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.
CheckFeatureSupport(MULTISAMPLE_QUALITY_LEVELS) refused the TILED_RESOURCE
flag with E_INVALIDARG. Native D3D12 (RX 7800 XT, a Radeon iGPU and WARP)
answers S_OK: 1x and 4x keep the plain answer, every other count has none,
and a format without a tile shape (96-bit) has none at any count, which is
GetResourceAllocationInfo's tiled rule here (tiled MSAA is 4x only).
128-bit formats tiled at 4x are a driver difference: the AMD drivers answer
0, WARP and NVIDIA allocate them; the layer follows the latter.
d3d12_vulkan_device_test compares the TILED_RESOURCE quality levels of six
formats at five counts with the host's (allowing that one difference). The
allocation side of the AMD failure is c97ae261's host-quality gate.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>