mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-13 17:49:29 +01:00
Dirty viewport state on framebuf resize.
This commit is contained in:
1 parent
1098bf7342
commit
aa2269020a
2 files changed
+6
-2
No files matched your search
@@ -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<int>(dstX * dstXFactor), dstY, srcBase, dstBuffer->format, static_cast<int>(srcStride * dstXFactor), static_cast<int>(dstWidth * dstXFactor), dstHeight);
|
||||
SetColorUpdated(dstBuffer, skipDrawReason);
|
||||
|
||||
+2
-2
@@ -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 },
|
||||
|
||||
Reference in new issue
Block a user