Repository navigation
d3d12_view_slices: clear every array-view range with a rectangle as well (D3D-VIEW-SLICES-RECT) - #9028
d3d12_view_slices: clear every array-view range with a rectangle as well (D3D-VIEW-SLICES-RECT)#9028coenflict wants to merge 1 commit into
Conversation
Each range (ArraySize -1 and, for the 4x depth array, counted slices) is cleared a second time with a rectangle of mip 0 scaled to the view's mip, and checked inside and outside it against the host's D3D12 and WARP. On the layer that clear goes through vkCmdClearAttachments in a rendering scope, which no test covered on a TEXTURE2DMSARRAY view; the readback and resolve are the same as the image clear's, so the pair tells a wrong clear apart from a wrong resolve. D3D-VIEW-SLICES-RECT. Test only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grimkaaah
left a comment
There was a problem hiding this comment.
Independent Linux CPU review
What changed: d3d12_view_slices clears every array-view range with a rectangle as well (D3D-VIEW-SLICES-RECT).
Checked: diff review of runtime/test/d3d12_view_slices_test.cpp (no local runtime build).
Looks correct; no game files.
|
Verified head
AI-assisted. |
|
Tested
So on Xe-LP / 101.7088 the host and the layer agree on every rectangle case (RTV and DSV 4x MS arrays, mip-chain arrays); none of the
AI-assisted (Claude Code). |
|
Tested 41f924a (merged onto main 867d922) on RTX 5070, NVIDIA 621.24, Windows 11 (build 26200), Vulkan validation layer on (
Ran the tests that belong to the test files this PR changes (ctest entries, or the test program directly when it is not registered), with no game files ( |
|
Tested
Independent check, claim. AI-assisted (Claude Code). |
Item: D3D-VIEW-SLICES-RECT, claim. Depends on: none.
What
d3d12_view_slicesclears every array-view range a second time, this time with a rectangle ({2, 1, 6, 7}in mip 0, scaled to the view's mip, since D3D12 rects are in the mip's own texels). The readback must be one inside the rectangle for the slices the view names, and zero everywhere else. This covers the 4xTEXTURE2DMSARRAYRTV and DSV views (ArraySize -1, plus counted slices for the depth array) and theTEXTURE2DARRAYmip-chain views. Like the existing cases, each one runs against the host's D3D12 on the layer's adapter and against WARP.The layer clears with a rectangle through
vkCmdClearAttachmentsin a rendering scope, not throughvkCmdClear*Image. Until now no test covered that path on a multisample array view. The resolve and readback are the same as in the image-clear run, so the two runs together can tell a wrong clear from a wrong resolve.Test only, no runtime change.
Why, and the Intel finding
This came out of looking at the Intel Arrow Lake-HX finding (six
DSV D32_FLOAT 4xfailures on driver 101.9175). As far as I can read it, that is D3D-739 / #8244 (a quirk of the native Intel reference), not a layer defect:on Intel(R) Graphics, which is the host reference. The layer's lines sayon the layer.LEONIDA_HOST_ADAPTER(d3d12_copy_compare.h:74). So the host stays Intel whatever that variable is set to.I have no Intel GPU, so that part is not confirmed on the hardware.
This PR also edits the
checklambda that #8244 edits. Whichever PR lands second needs a small rebase. Once both are in, #8244's host-zero allowance would also apply to the rectangle cases.Tested
Windows 11 26340, MSVC (VS 18) x64, Ninja RelWithDebInfo, Vulkan SDK 1.4.363, with
LEONIDA_VK_VALIDATION=1, usingctest -R "^(d3d12_view_slices|d3d12_clear|d3d12_clear_formats)$"and running the test directly:LEONIDA_VK_DEVICE)d3d12_clearandd3d12_clear_formatspass on both GPUs. There were no validation messages.detail::clipchanged so a rectangle clear reaches only the view's first layer, the layer gets 15 failures, all in the new rectangle cases, and the host and WARP have none.check_no_game_data.pypasses on the changed file.Synthetic tests only, no game files. AI-assisted (Claude Code).
🤖 Generated with Claude Code