Repository navigation
runtime: render-target views of a multisample texture array's slice range - #754
Conversation
…ange CreateRenderTargetView refused D3D12_RTV_DIMENSION_TEXTURE2DMSARRAY, so after the DSV change in ItsNotRexed#683 a multisample array could be a depth target but not a colour target (found by @Derpbeat on ItsNotRexed#683). The view is {resource, mip 0, FirstArraySlice, ArraySize}, as for the DSV; the replay already checks the range and clears through a view of those layers. d3d12_vulkan_device_test: a 4-layer 4x RGBA8 target is cleared red through a whole-array view and green through a view of slices 1-2; every slice is resolved and read back, so slices 0 and 3 must stay red and 1-2 green. A view of slices 3-4 is refused at execute (invalid_subresource). Without the change the test fails at the captured-range check. docs/d3d12_vulkan.md: the RTV/DSV bullet lists TEXTURE2DMSARRAY for both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verified rectangle clears and reuse of one CPU RTV descriptor on 276a9e9. RTX 5080, driver 616.92, Windows 11, Khronos validation enabled. The stock device test passed. In a source-built extension of the 4× MSAA RGBA8 test I cleared the four 8×8 slices red, then recorded a green [1,6) × [2,7) clear using slices 1–2. Before submitting that command list, I rewrote the same CPU RTV handle to slices 2–3 and recorded a blue [3,7) × [0,5) clear. Each slice was resolved and copied to readback. All 256 pixels, including alpha, matched their expected positions.
Omitting just the descriptor rewrite made exactly 40/256 pixels differ: the 20 blue pixels landed on slice 1 instead of slice 3. This exercises the rectangular attachment-clear path and confirms the first command retained its original layer range after the handle was reused. Validation reported no errors in the passing run. |
|
Thanks @Vonsek. The handle-rewrite case is a good addition: it confirms the recorded clear keeps the |
|
Tested
PR head as-is, no game files. AI-assisted. |
Item: new D3D item, claimed in #634 (#634 (comment)). Follow-up to #683, suggested by @Derpbeat there.
Change
CreateRenderTargetViewrefusedD3D12_RTV_DIMENSION_TEXTURE2DMSARRAY, so after #683 a multisample array could be a depth target but not a colour target. The view is{resource, mip 0, FirstArraySlice, ArraySize}, as for the DSV in #683. The replay already checks the range against the image and clears through a view of those layers, so nothing else changes.docs/d3d12_vulkan.md: the RTV/DSV bullet now listsTEXTURE2DMSARRAYfor both.Test
d3d12_vulkan_device_test, after #683's DSV case: a 4-layer 4xR8G8B8A8_UNORMtarget.invalid_subresource).Without the change the test fails at the captured-range check (
line 1774); with it the whole test passes.Tested on Windows 11, RTX 3060 (NVIDIA 616.64), clang-cl 23 + lld-link against the MSVC 14.44 CRT and Windows SDK 10.0.26100, on
main67204bf:ctest23/23. No game files.By @rafaelpssz, with Claude Code (AI-assisted).