Vulkan MSAA: Avoid creating backbuffer renderpasses with the wrong sample count, oops

This commit is contained in:
Henrik Rydgård committed 2024-01-17 21:41:04 +01:00
1 parent b5496851dc
commit ce2163eb93
3 files changed
+6 -2

No files matched your search

+1 -1
View File
@@ -155,7 +155,7 @@ public:
private:
// TODO: Might be better off with a hashmap once the render pass type count grows really large..
VkRenderPass pass[(size_t)RenderPassType::TYPE_COUNT]{};
VkSampleCountFlagBits sampleCounts[(size_t)RenderPassType::TYPE_COUNT];
VkSampleCountFlagBits sampleCounts[(size_t)RenderPassType::TYPE_COUNT]{};
RPKey key_;
};
+1 -1
View File
@@ -374,7 +374,7 @@ void VulkanQueueRunner::RunSteps(std::vector<VKRStep *> &steps, int curFrame, Fr
// When stepping in the GE debugger, we can end up here multiple times in a "frame".
// So only acquire once.
if (!frameData.hasAcquired) {
frameData.AcquireNextImage(vulkan_, frameDataShared);
frameData.AcquireNextImage(vulkan_);
SetBackbuffer(framebuffers_[frameData.curSwapchainImage], swapchainImages_[frameData.curSwapchainImage].image);
}
@@ -800,6 +800,10 @@ VKRGraphicsPipeline *VulkanRenderManager::CreateGraphicsPipeline(VKRGraphicsPipe
continue;
}
if (rpType == RenderPassType::BACKBUFFER) {
sampleCount = VK_SAMPLE_COUNT_1_BIT;
}
pipeline->pipeline[i] = Promise<VkPipeline>::CreateEmpty();
compileQueue_.push_back(CompileQueueEntry(pipeline, compatibleRenderPass->Get(vulkan_, rpType, sampleCount), rpType, sampleCount));
needsCompile = true;