mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:50:51 +01:00
[PR #581] runtime/d3d12: implement ForcedSampleCount target-independent rasterization (OLD-7205) #624
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#624
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/581
Author: @Taffyyy-ops
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:feat/d3d12-forced-sample-count📝 Commits (2)
93bd7c8runtime/d3d12: implement ForcedSampleCount target-independent rasterizationdd604fdruntime/d3d12: gate VK_AMD_mixed_attachment_samples opt-in and harden AMD TIR tests📊 Changes
7 files changed (+1723 additions, -43 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+41 -1)📝
runtime/CMakeLists.txt(+8 -0)📝
runtime/shims/d3d12_com.h(+8 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+117 -41)📝
runtime/src/vulkan_replay.h(+1 -1)➕
runtime/test/d3d12_forced_sample_count_test.cpp(+1527 -0)📝
runtime/test/vk_test_device.h(+21 -0)📄 Description
Claimed in the coordination issue as: OLD-7205 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7126487215)
What and why
Carried over from the closed upstream
ItsNotRexed/LeonidaPR #7205 and rebased cleanly ontoubiquitarianism/leonidamain(fecb3cc1b,2830b134a).Implements D3D12 Target-Independent Rasterization (
D3D12_RASTERIZER_DESC::ForcedSampleCount∈{0, 1, 4, 8, 16}):ForcedSampleCount(plus depth/stencil disabled andDXGI_FORMAT_UNKNOWNDSV rules, andSampleDesc.Count == 1whenForcedSampleCount > 1) inruntime/shims/d3d12_vulkan_device.cpp(D3D12_RESOURCE_DESC/ PSO creation andd3d12_com.h).ForcedSampleCount) unconditionally when supported, and 1x-RTV mixed-sample TIR viaVK_NV_framebuffer_mixed_samples(enabled by default on NVIDIA) orVK_AMD_mixed_attachment_samples(gated behind explicit opt-inLEONIDA_VK_AMD_MIXED_SAMPLES=1due to AMDSV_Coverage/SampleMask/ RDNA4 occlusion divergences measured in upstream #7205 review).runtime/src/vulkan_replay.handruntime/test/vk_test_device.h, updatesdocs/d3d12_vulkan.md, and adds comprehensive host-parity tests (d3d12_forced_sample_count) inruntime/test/d3d12_forced_sample_count_test.cppandruntime/CMakeLists.txt.Tested
Built cleanly with MSVC 19.44 / Ninja (
cmake --build runtime/build, 0 new/W4warnings on modified files) and verified after rebasing onto1c93c8697:driver 621.24, Windows 11, vs native D3D12 + Microsoft WARP):ctest --test-dir runtime/build -R "^d3d12_forced_sample_count$" --output-on-failure -V-> Passed (2.39 sec, all checks passed: 22 PSO validation cases, 15+ attachmentless occlusion scenes, mixed-sample RGBA8 / SV_Coverage / MRT / unbound-RTV / conservative TIR, capability gating, multi-submission PSO switching sequence).ctest --test-dir runtime/build -R "^d3d12_forced_sample_count$" --output-on-failure -V-> Passed (0.63 sec, attachmentless TIR 15/15 passed, capability gatingmixed_attachment_samples=0verified).python -I scripts/check_no_game_data.py-> exit 0git diff --check upstream/main..HEAD-> exit 0Previous independent runs on the identical rebased code (upstream
ItsNotRexed/LeonidaPR #7205 before repo closure): NVIDIA RTX 3060, RTX 3070 (Khronos core+sync validation 1.4.363.0, 0 errors), RTX 5070 Ti, RTX 5080, and AMD Radeon RX 9060 XT (RDNA4, driver 26.11.2, includingLEONIDA_VK_VALIDATION=1).GPUs tested: NVIDIA GeForce RTX 5060 Laptop GPU (driver 621.24, Windows 11); Intel(R) RaptorLake-S Mobile Graphics Controller (Windows 11); plus WARP reference
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.