[PR #778] d3d12: replay programmable sample positions (D3D-SAMPLE-POSITIONS) #817

Open
opened 2026-11-26 20:19:08 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/778
Author: @kawaii-shakal
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: d3d-sample-positions


📝 Commits (7)

  • 27781f7 d3d12: replay programmable sample positions (D3D-SAMPLE-POSITIONS)
  • 07f9ede Merge main and retain sample locations through depth clear initialization
  • a3e2088 Merge main into d3d-sample-positions
  • ec2af13 Merge upstream main into d3d-sample-positions
  • f17c365 Merge upstream main into d3d-sample-positions
  • c1a1f3d Merge upstream main into d3d-sample-positions
  • 5d30fcd Merge remote-tracking branch 'upstream/main' into d3d-sample-positions

📊 Changes

11 files changed (+332 additions, -62 deletions)

View changed files

📝 runtime/CMakeLists.txt (+3 -1)
📝 runtime/shims/d3d12_com.cpp (+21 -0)
📝 runtime/shims/d3d12_com.h (+1 -0)
📝 runtime/shims/d3d12_vulkan_device.cpp (+60 -6)
📝 runtime/src/command_list.h (+17 -1)
📝 runtime/src/vulkan_backend.h (+3 -2)
📝 runtime/src/vulkan_replay.h (+115 -49)
📝 runtime/test/command_list_test.cpp (+16 -0)
📝 runtime/test/d3d12_msaa_draw_test.cpp (+55 -3)
📝 runtime/test/replay_texture_barrier_test.cpp (+36 -0)
📝 runtime/test/vk_test_device.h (+5 -0)

📄 Description

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.

  • One topic
  • Changed files passed the game-data check
  • GitHub reported mergeable against main at 47c65117

AI-assisted: yes. Implemented and tested by Codex.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/778 **Author:** [@kawaii-shakal](https://github.com/kawaii-shakal) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `d3d-sample-positions` --- ### 📝 Commits (7) - [`27781f7`](https://github.com/ubiquitarianism/leonida/commit/27781f7f9b296fcdbac5c86792c2f2c2b308ba9b) d3d12: replay programmable sample positions (D3D-SAMPLE-POSITIONS) - [`07f9ede`](https://github.com/ubiquitarianism/leonida/commit/07f9ede72361a072c5155d9de5159ebc4a567a3c) Merge main and retain sample locations through depth clear initialization - [`a3e2088`](https://github.com/ubiquitarianism/leonida/commit/a3e2088fd61303a908e94887fefb2f7d023ce195) Merge main into d3d-sample-positions - [`ec2af13`](https://github.com/ubiquitarianism/leonida/commit/ec2af135e35c1a3961b3c4b53874dda9cb504a41) Merge upstream main into d3d-sample-positions - [`f17c365`](https://github.com/ubiquitarianism/leonida/commit/f17c365b612d9beeb99924efe23c4b6b330e9254) Merge upstream main into d3d-sample-positions - [`c1a1f3d`](https://github.com/ubiquitarianism/leonida/commit/c1a1f3dde46e7ded5d253d2663f91b1d762e3c38) Merge upstream main into d3d-sample-positions - [`5d30fcd`](https://github.com/ubiquitarianism/leonida/commit/5d30fcdad328a2d617f79dfccdde2e50c29c7641) Merge remote-tracking branch 'upstream/main' into d3d-sample-positions ### 📊 Changes **11 files changed** (+332 additions, -62 deletions) <details> <summary>View changed files</summary> 📝 `runtime/CMakeLists.txt` (+3 -1) 📝 `runtime/shims/d3d12_com.cpp` (+21 -0) 📝 `runtime/shims/d3d12_com.h` (+1 -0) 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+60 -6) 📝 `runtime/src/command_list.h` (+17 -1) 📝 `runtime/src/vulkan_backend.h` (+3 -2) 📝 `runtime/src/vulkan_replay.h` (+115 -49) 📝 `runtime/test/command_list_test.cpp` (+16 -0) 📝 `runtime/test/d3d12_msaa_draw_test.cpp` (+55 -3) 📝 `runtime/test/replay_texture_barrier_test.cpp` (+36 -0) 📝 `runtime/test/vk_test_device.h` (+5 -0) </details> ### 📄 Description Claimed in the coordination issue as: D3D-SAMPLE-POSITIONS ([claim](https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7131913258)) ### 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](https://github.com/ubiquitarianism/leonida/pull/778#issuecomment-7133373324)). A separate combined build with #499 passed four GPU tests including indirect draws with custom sample positions ([integration result and merge notes](https://github.com/ubiquitarianism/leonida/pull/778#issuecomment-7133487399)). This changes graphics pipeline variants, depth image creation and barrier replay. Rollback is a source revert. - [x] One topic - [x] Changed files passed the game-data check - [x] GitHub reported mergeable against main at 47c65117 AI-assisted: yes. Implemented and tested by Codex. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#817
No description provided.