mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-24 05:49:58 +00:00
Vulkan: The validation layers don't like zero-size blits.
This commit is contained in:
parent
944cc94630
commit
4f4eb6f024
@ -2081,7 +2081,7 @@ void FramebufferManagerCommon::DownloadFramebufferForClut(u32 fb_address, u32 lo
|
||||
FlushBeforeCopy();
|
||||
|
||||
// No need to download if we already have it.
|
||||
if (!vfb->memoryUpdated && vfb->clutUpdatedBytes < loadBytes) {
|
||||
if (w > 0 && h > 0 && !vfb->memoryUpdated && vfb->clutUpdatedBytes < loadBytes) {
|
||||
// We intentionally don't call OptimizeDownloadRange() here - we don't want to over download.
|
||||
// CLUT framebuffers are often incorrectly estimated in size.
|
||||
if (x == 0 && y == 0 && w == vfb->width && h == vfb->height) {
|
||||
|
@ -586,11 +586,17 @@ void VulkanRenderManager::BlitFramebuffer(VKRFramebuffer *src, VkRect2D srcRect,
|
||||
_dbg_assert_msg_(G3D, srcRect.offset.x + srcRect.extent.width <= (uint32_t)src->width, "srcrect offset x + extent > width");
|
||||
_dbg_assert_msg_(G3D, srcRect.offset.y + srcRect.extent.height <= (uint32_t)src->height, "srcrect offset y + extent > height");
|
||||
|
||||
_dbg_assert_msg_(G3D, srcRect.extent.width > 0, "blit srcwidth == 0");
|
||||
_dbg_assert_msg_(G3D, srcRect.extent.height > 0, "blit srcheight == 0");
|
||||
|
||||
_dbg_assert_msg_(G3D, dstRect.offset.x >= 0, "dstrect offset x < 0");
|
||||
_dbg_assert_msg_(G3D, dstRect.offset.y >= 0, "dstrect offset y < 0");
|
||||
_dbg_assert_msg_(G3D, dstRect.offset.x + dstRect.extent.width <= (uint32_t)dst->width, "dstrect offset x + extent > width");
|
||||
_dbg_assert_msg_(G3D, dstRect.offset.y + dstRect.extent.height <= (uint32_t)dst->height, "dstrect offset y + extent > height");
|
||||
|
||||
_dbg_assert_msg_(G3D, dstRect.extent.width > 0, "blit dstwidth == 0");
|
||||
_dbg_assert_msg_(G3D, dstRect.extent.height > 0, "blit dstheight == 0");
|
||||
|
||||
VKRStep *step = new VKRStep{ VKRStepType::BLIT };
|
||||
|
||||
step->blit.aspectMask = aspectMask;
|
||||
|
Loading…
Reference in New Issue
Block a user