graphics: create the image heap before the pipeline cache prewarms pipelines #2062
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2062
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2062"
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?
@Nawid3333 on GitHub · 2026-11-02 01:34 UTC · original
Nawid3333:fix/image-heap-before-warmup→main· +4 −3 · 2 files · 2 commits · closed without mergingSummary
Since
ec8b75b24the pipeline cache creates the stored pipelines in its constructor (WarmUp). Pipelines whose shaders read the image heap (27dc7c281) usegraphics.image_heap_layoutas set 1.RenderContextconstructedm_pipeline_cachebeforem_image_heap, and onlyImageHeap's constructor sets that layout. So on every boot with a shader store that holds such a pipeline,WarmUpcreated a pipeline layout whose set 1 isVK_NULL_HANDLE.On a Radeon RX 9070 XT (AMD Windows driver 26.10.1), Ghost of Yōtei (PPSA26344) crashed on its second boot, in
amdvlk64.dllwhile the prewarm created pipelines (access violation reading0x20). The validation layer reports:VUID-VkPipelineLayoutCreateInfo-graphicsPipelineLibrary-06753:pSetLayouts[1]isVK_NULL_HANDLE;VUID-VkGraphicsPipelineCreateInfo-layout-07988: the fragment shader uses set 1 binding 0, which the layout does not declare.Change
m_pipeline_cacheis declared and initialized afterm_image_heap. No constructor between the old and the new position uses the pipeline cache.Tests
Ghost of Yōtei (#1599) on a Radeon RX 9070 XT (AMD Windows driver 26.10.1), with #1967 and #1758, which this game needs
to get far enough to compile image-heap shaders:
errors above.
no validation error from the prewarm, and the game keeps loading until it stops at
image heaps exceed 65536 resident images(imageHeap.cpp:389), which is unrelated.AI use: drafted with AI assistance (Claude Code); verified and tested by me.
@coderabbitai[bot] on GitHub · 2026-11-02 01:39 UTC · original · edited 2026-11-23 17:14 UTC
No actionable comments were generated in the recent review.
Walkthrough
RenderContextcache and heap members were reordered in the class declaration. The constructor initializer list was reordered to match. This changes member initialization and destruction order.Suggested reviewers:
nmzikChange: Bug fix
Merge Risk:
Minimal · up to
0aad7This change builds the image heap before the pipeline cache prewarms pipelines, so prewarmed pipeline layouts include the image heap layout. No lifetime hazard was found. The change is low risk to merge.
Pre-merge checks:
4
Full details: Title check
Explanation
The title names the main change: the image heap is now created before the pipeline cache, so that prewarm sees the image heap layout. It matches the reordering in renderContext.h and renderContext.cpp and the objectives in the PR.
Full details: Description check
Explanation
The description explains the bug and the fix. It states that m_pipeline_cache is now declared and initialized after m_image_heap, which matches the reordering in the changed files. It also gives test details for the crash and the validation errors.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
276d5c6b-c8ba-4174-b8bd-2bddcc145957Reviewing files that changed from the base of the PR and between
85e775f014and0aad72099e.src/graphics/host_gpu/renderer/renderContext.cppsrc/graphics/host_gpu/renderer/renderContext.hIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.
@Nawid3333 on GitHub · 2026-11-26 21:30 UTC · original
Main has the same change since
832d6dac1(graphics: initialize image heap before pipeline cache warm-up), so I'm closing this one.Pull request closed