Repository navigation
d3d12: replay programmable sample positions (D3D-SAMPLE-POSITIONS) - #778
kawaii-shakal wants to merge 8 commits into
Conversation
|
Regression comparison for 27781f7 on Windows 11, RTX 5070 Ti (617.42), with Vulkan validation enabled. Eight of nine selected CTests passed, including depth resolves, both bundle suites, command recording, enhanced texture barriers and all three MSAA cases. I built the ninth test, d3d12_execute_indirect_validation, separately at the exact parent 51f3160. Both builds produced identical results for all five failing argument-range cases out of 49. The positive GPU dispatch passed. #306 tracks these cases. Graphics ExecuteIndirect integration overlaps #499, which adds graphics-state preparation to indirect draws. When combining the patches, both calls to prepare_draw need the active sample pattern, and the Vulkan sample-location command belongs in the draw-state setup shared by direct and indirect draws. The nine-test run above did not exercise the two branches combined. — Codex |
|
I tested #778 together with #499 in a separate checkout. There is one textual conflict in vulkan_replay.h. I kept #499's shared emit_graphics_pass, passed active sample positions to its attachment transitions and indirect prepare_draw call, and set the Vulkan sample locations in that shared pass. To exercise the combination, I changed the MSAA test's red triangle to ExecuteIndirect(DRAW), including the draws before and after resetting the 2x2 pattern. The GPU readback checks were unchanged. On RTX 5070 Ti (617.42), with Vulkan validation, all four tests passed: d3d12_indirect_draw, d3d12_msaa_draw, d3d12_custom_samples and d3d12_sample_grid_reset. These integration edits were local. Whichever PR lands second needs the conflict resolution above. — Codex |
|
Independently tested
Additional synthetic checks confirmed:
A trial merge against One integration consideration: #499 overlaps the graphics replay paths. Whichever lands second should preserve sample-position state through the refactored direct and indirect draw paths. No defects found in the tested configurations. LGTM. |
|
Thanks for the independent run on Wine/RTX 3060 and the extra synthetic checks (Tier 0 without the extension, D32 transitions, ClearState/Reset, bundles). On the #499 overlap: the resolution is in the earlier comment. Keep #499's shared |
|
Merged main at 6293c1c into this branch in 07f9ede. The depth-clear path now passes the active sample positions to image initialization and keeps the restricted-depth clamp from main. I tested this tree on native Windows with Vulkan validation enabled on an RTX 5070 Ti. All five focused tests passed: — Codex |
Conflicts, all kept from both sides: - GraphicsPipeline: main's rectangle_stage took bit 9, so custom_samples moves to bit 10; sample grids sit next to main's async_build. - The pipeline variant appends VK_DYNAMIC_STATE_SAMPLE_LOCATIONS_EXT to main's dyn_list (8 entries at most) and keeps main's lazy shader modules. - initialize() takes main's per-aspect zeroing and depth-UAV paths and still passes the active sample positions to every barrier. - prepare_draw keeps main's skip/quad-index handling and the sample positions argument; emit_commands keeps active_samples, including main's clear-pattern round trip and the release (into UNDEFINED) barriers. - Texture creation keeps main's 1D/3D UAV limits and the sample grid. - Both new replay_texture_barrier_test cases are kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged main (237deb6) into this branch as
Tested on native Windows 11 Pro 26300, RTX 5070 Ti, NVIDIA 617.42, MSVC 19.50: full |
Preserve indirect draw arguments and programmable sample positions in the same replay preparation path. Conflict resolution and Linux verification by Codex.
|
AI-assisted update by Codex in Linux verification passed all seven targeted CTest cases, including Vulkan command replay on Mesa llvmpipe. A synthetic Vulkan check confirmed that the custom MSAA pipeline variant is selected and that sample locations are emitted before the indirect draw. Native Windows D3D12 tests are pending. Configuration: the conflict resolution required no build or runtime configuration changes. |
Keep depth bounds and programmable sample locations in the same Vulkan pipeline. Conflict resolution assisted by Codex.
# Conflicts: # runtime/src/vulkan_replay.h
# Conflicts: # runtime/src/vulkan_replay.h
Claimed in the coordination issue as: D3D-SAMPLE-POSITIONS (claim)
What and why
SetSamplePositions was a stub and OPTIONS2 reported tier 0. Replay now copies the positions into the command list, selects a graphics pipeline variant, sets the Vulkan sample locations, and carries them through depth layout transitions. OPTIONS2 evaluates the supported grids per sample count.
Tested
Three GPU tests passed at 27781f7 with Vulkan validation. The baseline observed tier 0 with the extension disabled. The programmable cases observed tier 2. Pixel readback covered a single pattern, a 2x2 grid, reset in the same command list, and D32 contents after a transition to COPY_SOURCE and back. CPU tests checked ownership of recorded positions and the coordinates supplied to enhanced barriers.
GPUs tested: NVIDIA GeForce RTX 5070 Ti, Windows 11, driver 617.42.
Integration and regressions
The nine-test regression run passed eight tests. The remaining five argument-range mismatches reproduced identically at the parent commit (comparison). A separate combined build with #499 passed four GPU tests including indirect draws with custom sample positions (integration result and merge notes). This changes graphics pipeline variants, depth image creation and barrier replay. Rollback is a source revert.
AI-assisted: yes. Implemented and tested by Codex.