mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 01:23:51 +00:00
fix: track render pass subpass mode to prevent ImGui secondary violation
When parallel recording is active, the scene pass uses VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS. Post-processing paths (FSR/FXAA) end the scene pass and begin a new INLINE render pass for the swapchain output. ImGui rendering must use the correct mode — secondary buffers for SECONDARY passes, direct calls for INLINE. Previously the check used a static condition based on enabled features (!fsr && !fsr2 && !fxaa && parallel), which could mismatch if a feature was enabled but initialization failed. Replace with endFrameInlineMode_ flag that tracks the actual current render pass mode at runtime, eliminating the validation error VUID-vkCmdDrawIndexed-commandBuffer-recording that caused intermittent NVIDIA driver crashes.
This commit is contained in:
parent
a152023e5e
commit
9a6a430768
2 changed files with 17 additions and 7 deletions
|
|
@ -668,6 +668,7 @@ private:
|
|||
VkCommandBuffer secondaryCmds_[NUM_SECONDARIES][MAX_FRAMES] = {};
|
||||
|
||||
bool parallelRecordingEnabled_ = false; // set true after pools/buffers created
|
||||
bool endFrameInlineMode_ = false; // true when endFrame switched to INLINE render pass
|
||||
bool createSecondaryCommandResources();
|
||||
void destroySecondaryCommandResources();
|
||||
VkCommandBuffer beginSecondary(uint32_t secondaryIndex);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue