mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:25:52 +01:00
[PR #681] d3d12: select only the needed deferred Vulkan draw pipeline #721
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#721
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/681
Author: @QemmHD
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:qemmhd/rt-lazy-attachment-variant📝 Commits (2)
88658f1d3d12: LEONIDA_LAZY_PSO=1 builds pipelines at their first draw or dispatch and keeps no unedited shader modules (RT-LAZY-PSO)a3a9b28d3d12: select the needed deferred draw pipeline📊 Changes
5 files changed (+250 additions, -41 deletions)
View changed files
📝
docs/d3d12_vulkan.md(+8 -0)📝
runtime/CMakeLists.txt(+9 -0)📝
runtime/shims/d3d12_vulkan_device.cpp(+151 -33)📝
runtime/src/vulkan_replay.h(+18 -8)📝
runtime/test/replay_cpu_bench.cpp(+64 -0)📄 Description
Claimed in #14 as RT-LAZY-ATTACHMENT-VARIANT.
Depends on: #511. This branch keeps the original #511 commit intact. The last commit is the change for review.
What and why
The deferred Vulkan draw path tries the full-attachment pipeline before it knows which attachments are bound. When a target is absent, this can compile two pipelines for one draw. If the full-attachment compile fails, replay rejects the draw before trying its usable variant.
Select the pipeline once after draw validation, using the final attachment mask. Fully bound eager draws still use the pipeline they already have. The CPU replay self-test covers eager draws, fully bound and partial lazy draws, a refused unused base, and an invalid mesh draw.
Tested
replay_cpu_bench_selfteston Windows 11 with MSVC 2022 x64 and Vulkan SDK headers.git diff --check, the repository game-data scan on both changed files, and the merge check againstmainat21625bca8passed.GPU coverage for this follow-up: CPU replay fixture only.
AI-assisted: yes (Codex).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.