Repository navigation
Conversation
|
Tested 0b8b354 on NVIDIA GeForce RTX 4080, driver 617.42: d3d12_barrier_validation_test exits 0 with "layer null-pointer regression: 10 cases, 0 failures", "parity matrix: 33 cases (HW compared=33, WARP compared=33), 0 failures" and "GPU replay (legacy + enhanced barriers): passed". d3d12_close_parity_test exits 0 with "close parity: 100 cases, 68 match WARP, 20 known layer-stricter, 12 known layer-looser, 0 not run, 0 where WARP differs from the measured column, 0 failures". d3d12_com_test and d3d12_state_map_test exit 0 with their summary lines, and command_list_test and d3d12_vulkan_device_test exit 0 with no summary. No validation layer was loaded and d3d12_gcl8_test was not run. AI-assisted. |
|
Independent synthetic check of head Distinct from the RTX 4080 report: I submitted seven individual valid barrier-only command lists to each of native NVIDIA D3D12, WARP and the Vulkan-backed layer, each in a fresh bounded process. All 21 closed successfully and their fences completed: legacy COMMON -> COPY_DEST, legacy COMMON -> COPY_SOURCE|PIXEL_SHADER_RESOURCE, enhanced global NONE/NO_ACCESS -> ALL/COMMON, buffer COPY/COPY_DEST -> COMPUTE/UAV, discarded texture UNDEFINED -> RENDER_TARGET, global ALL_SHADING/(VERTEX_BUFFER|CONSTANT_BUFFER) -> DRAW/INDEX_BUFFER, and global RESOLVE/RESOLVE_DEST -> COPY/COPY_SOURCE. These controls did not find a rejected valid combination; this is not exhaustive. On the layer, Limits: the Windows D3D12 debug layer was unavailable, so native/WARP acceptance is not debug-layer validation. The lists only contain barriers, not data readback or functional rendering. I deliberately did not run the full 33-case host matrix or submit invalid native calls, to avoid potentially unsafe driver calls; these results do not independently establish invalid-argument parity. No cases in the seven-case submitted set were skipped; no timeouts or discrepancies observed. AI-assisted. |
|
I found a remaining invalid texture-barrier combination in the current head. Source-level repro after CHECK(list.barrier(TextureBarrier{y::all, y::render_target, a::common, a::render_target,
l::undefined, l::render_target, 9, all, texture_barrier_discard}));The current predicates accept and append it: I could not run the C++ target locally because CMake, Ninja, and MSVC/clang-cl are unavailable. |
|
Separate compatibility regression from the UNDEFINED/access pairing above: Repro with the current test aliases after CHECK(list.barrier(TextureBarrier{y::all, y::all, a::shader_resource, a::shader_resource,
31u, 31u, 9, all, 0}));This returns false solely because |
|
Tested 0b8b354 on Intel UHD Graphics 770, driver 32.0.101.7088, MSVC 19.44, with VK_LAYER_KHRONOS_validation loaded (the loader prints "adding layers VK_LAYER_KHRONOS_validation"): command_list_test, d3d12_com_test, d3d12_barrier_validation_test, d3d12_close_parity_test, d3d12_state_map_test, d3d12_gcl8_test and d3d12_vulkan_device_test build and exit 0, with 0 "Validation Error" lines in their output. d3d12_barrier_validation_test prints "layer null-pointer regression: 10 cases, 0 failures" and "parity matrix: 33 cases (HW compared=14, WARP compared=33), 0 failures", so the hardware leg compares 14 of 33 on this GPU. d3d12_close_parity_test prints "close parity: 100 cases, 68 match WARP, 20 known layer-stricter, 12 known layer-looser, 0 not run, 0 where WARP differs from the measured column, 0 failures". command_list_test, d3d12_state_map_test and d3d12_gcl8_test print no device line, so for them the exit code is the only signal. d3d12_vulkan_device_test prints "[rt] d3d12: ExecuteCommandLists failed: invalid query; nothing was submitted" on stderr and still exits 0; I did not run main, so I cannot say whether that line is new. ctest was not run. AI-assisted. |
Kam471
left a comment
There was a problem hiding this comment.
Reviewed at 0b8b35405a on Windows 11, RTX 5070 Ti, VS2022/Ninja, Vulkan 1.4.363.
- Built with
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTING=ON -DLEONIDA_BUILD_WINDOWS_RUNTIME=ON, ran withLEONIDA_VK_DEVICE='RTX 5070 Ti'andLEONIDA_VK_VALIDATION=1. d3d12_barrier_validation_test.exe: exit 0. 10/10 null-pointer cases, 33/33 hardware parity, 33/33 WARP parity, GPU replay passed; 0 failures.ctest -R '^(command_list|d3d12_com|d3d12_barrier_validation|d3d12_gcl8|d3d12_vulkan_device|d3d12_close_parity)$': 6/6 passed. close parity: 100 cases, 68 match WARP (+3), 0 failures.- Negative control: the same test built against main
561b65a83faults with0xC0000005(access violation) on the firstResourceBarrier(1, nullptr)case; this branch returns the D3D12 error instead. - Reviewed the new state/access/layout checks: bit sets match the SDK enums and the measured matrix.
Verdict: LGTM. It fixes the crash and the hardware/WARP parity holds on this GPU.
|
Thanks @Flyander for both catches! Addressed in commit
Verification (Windows 11, NVIDIA GeForce RTX 5090,
|
|
Independent barrier retest at |
|
Tested fba9bb7 on Windows 11, AMD Radeon RX 9070 XT (RDNA4), driver 32.0.32029.2010: pass
AI-assisted (Claude Code). |
|
Adding to @Jadiac5's RX 9070 XT run at AI-assisted. |
Claim: #5581 (comment)
Summary
Fixes null-pointer dereference crashes and tightens D3D12 argument validation parity in ID3D12GraphicsCommandList::ResourceBarrier and ID3D12GraphicsCommandList7::Barrier (
untime/shims/d3d12_com.cpp,
untime/src/command_list.h), verified against native Windows D3D12 on NVIDIA GeForce RTX 5090 and WARP. Does not touch COPY/COMPUTE list-type restrictions (#5252) or �ulkan_replay.h.
Changes
untime/shims/d3d12_com.cpp):
untime/src/command_list.h):
untime/test/d3d12_barrier_validation_test.cpp,
untime/test/command_list_test.cpp,
untime/test/d3d12_close_parity_test.cpp,
untime/CMakeLists.txt):
Verification (Windows 11, NVIDIA GeForce RTX 5090, LEONIDA_VK_VALIDATION=1)
All tests built and passed with 0 failures and 0 Vulkan validation errors:
AI-assisted (Gemini 4 Neon).