Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Common/GPU/Vulkan/VulkanQueueRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,10 @@ void VulkanQueueRunner::PerformBlit(const VKRStep &step, VkCommandBuffer cmd) {
int layerCount = std::min(step.blit.src->numLayers, step.blit.dst->numLayers);
_dbg_assert_(step.blit.src->numLayers >= step.blit.dst->numLayers);

// Blitting is not allowed for multisample images. You're suppose to use vkCmdResolveImage but it only goes in one direction (multi to single).
_dbg_assert_(step.blit.src->sampleCount == VkSampleCountFlagBits::VK_SAMPLE_COUNT_1_BIT);
_dbg_assert_(step.blit.dst->sampleCount == VkSampleCountFlagBits::VK_SAMPLE_COUNT_1_BIT);

VKRFramebuffer *src = step.blit.src;
VKRFramebuffer *dst = step.blit.dst;

Expand Down
5 changes: 5 additions & 0 deletions GPU/Common/StencilCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,11 @@ bool FramebufferManagerCommon::PerformWriteStencilFromMemory(u32 addr, int size,
useBlit = false;
}

// Blitting to (or from) multisampled images is not allowed.
if (dstBuffer->fbo && dstBuffer->fbo->MultiSampleLevel() != 0) {
useBlit = false;
}

u16 w = useBlit ? dstBuffer->width : dstBuffer->renderWidth;
u16 h = useBlit ? dstBuffer->height : dstBuffer->renderHeight;

Expand Down
Loading