diff --git a/GPU/Common/FramebufferCommon.cpp b/GPU/Common/FramebufferCommon.cpp index e66706cf32..2d9d13150d 100644 --- a/GPU/Common/FramebufferCommon.cpp +++ b/GPU/Common/FramebufferCommon.cpp @@ -633,6 +633,8 @@ void FramebufferManagerCommon::NotifyVideoUpload(u32 addr, int size, int width, DEBUG_LOG(ME, "Changing stride for %08x from %d to %d", addr, vfb->fb_stride, width); const int bpp = fmt == GE_FORMAT_8888 ? 4 : 2; ResizeFramebufFBO(vfb, width, size / (bpp * width)); + // Resizing may change the viewport/etc. + gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE); vfb->fb_stride = width; // This might be a bit wider than necessary, but we'll redetect on next render. vfb->width = width; @@ -1647,6 +1649,8 @@ void FramebufferManagerCommon::NotifyBlockTransferAfter(u32 dstBasePtr, int dstS dstBuffer->newWidth = std::max(dstWidth, (int)dstBuffer->width); dstBuffer->newHeight = std::max(dstHeight, (int)dstBuffer->height); dstBuffer->lastFrameNewSize = gpuStats.numFlips; + // Resizing may change the viewport/etc. + gstate_c.Dirty(DIRTY_VIEWPORTSCISSOR_STATE); } DrawPixels(dstBuffer, static_cast(dstX * dstXFactor), dstY, srcBase, dstBuffer->format, static_cast(srcStride * dstXFactor), static_cast(dstWidth * dstXFactor), dstHeight); SetColorUpdated(dstBuffer, skipDrawReason); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 574370ba51..e7897910fb 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -179,8 +179,8 @@ const CommonCommandTableEntry commonCommandTable[] = { { GE_CMD_CLIPENABLE, FLAG_FLUSHBEFOREONCHANGE }, // Z clip - { GE_CMD_MINZ, FLAG_FLUSHBEFOREONCHANGE, DIRTY_DEPTHRANGE | DIRTY_VIEWPORTSCISSOR_STATE}, - { GE_CMD_MAXZ, FLAG_FLUSHBEFOREONCHANGE, DIRTY_DEPTHRANGE | DIRTY_VIEWPORTSCISSOR_STATE}, + { GE_CMD_MINZ, FLAG_FLUSHBEFOREONCHANGE, DIRTY_DEPTHRANGE | DIRTY_VIEWPORTSCISSOR_STATE }, + { GE_CMD_MAXZ, FLAG_FLUSHBEFOREONCHANGE, DIRTY_DEPTHRANGE | DIRTY_VIEWPORTSCISSOR_STATE }, // Region { GE_CMD_REGION1, FLAG_FLUSHBEFOREONCHANGE, DIRTY_FRAMEBUF | DIRTY_TEXTURE_PARAMS },