Repository navigation
Conversation
…patch and keeps no unedited shader modules (RT-LAZY-PSO) Graphics PSOs build their driver pipeline as variant(0) at the first draw; compute PSOs compile through ComputePipeline::build at the first dispatch. A stage the runtime does not edit (no f16 link, no D24 depth patch) keeps no VkShaderModule: build() makes one from the library's words per pipeline and destroys it after. The compute subgroup request is still decided and recorded at creation in both modes. Off by default. Tests: d3d12_compute_lazy_pso, d3d12_draw_lazy_pso, d3d12_mesh_lazy_pso (the existing tests with the switch on). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
SweatierKey
approved these changes
Nov 24, 2026
SweatierKey
left a comment
Contributor
There was a problem hiding this comment.
Independent verification on Windows 11 against origin/main@1504c1af6:
- Cross-compiled
replay_cpu_bench.exe(clang-cl+ xwin SDK 10.0.26100) and ran natively on Windows 11:- Passed
check_draw_pipeline_selection()and all replay CPU benchmarks (rc=0).
- Passed
- Audited
d3d12_vulkan_device.cppandvulkan_replay.h: clean deferred pipeline creation underLEONIDA_LAZY_PSO=1(preserving edited modules for f16-link and depth24 fragments, building unedited stages on demand and destroying transientVkShaderModules immediately aftervkCreate*Pipelines). python3 -I scripts/check_no_game_data.py: clean.
AI-assisted: yes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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).