Not pretty, but with this, you can switch MSAA level at runtime.

This commit is contained in:
Henrik Rydgård committed 2022-12-01 23:41:31 +01:00
1 parent 28e1b532bd
commit 8a3e92aa38
12 files changed
+40 -15

No files matched your search

+2 -4
View File
@@ -1327,10 +1327,8 @@ void VulkanQueueRunner::PerformRenderPass(const VKRStep &step, VkCommandBuffer c
VkSampleCountFlagBits fbSampleCount = step.render.framebuffer ? step.render.framebuffer->sampleCount : VK_SAMPLE_COUNT_1_BIT;
if (RenderPassTypeHasMultisample(rpType) && fbSampleCount != graphicsPipeline->SampleCount()) {
// Sample count might have started mismatching if the user changed multisampling mode. Let's get rid of all variants
// and start over.
// (We could avoid this if sample count was baked into the rpType, but I don't want that to grow too big).
graphicsPipeline->DestroyAllVariants(vulkan_);
// Shouldn't happen, pipeline invalidation after render resized should have taken care of this.
_assert_(false);
}
if (!graphicsPipeline->pipeline[(size_t)rpType]) {