From d64d2afcb38efb4d9c6bc2daef7562a6b11dbdc8 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 1 Jun 2014 18:45:03 -0700 Subject: [PATCH] Don't allow a zero framebuf stride in estimation. --- GPU/GLES/Framebuffer.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 0deb8afba9..1a5dea517e 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -638,15 +638,13 @@ VirtualFramebuffer *FramebufferManager::GetVFBAt(u32 addr) { // Heuristics to figure out the size of FBO to create. void FramebufferManager::EstimateDrawingSize(int &drawing_width, int &drawing_height) { - const int default_width = 480; - const int default_height = 272; const int viewport_width = (int) gstate.getViewportX1(); const int viewport_height = (int) gstate.getViewportY1(); const int region_width = gstate.getRegionX2() + 1; const int region_height = gstate.getRegionY2() + 1; const int scissor_width = gstate.getScissorX2() + 1; const int scissor_height = gstate.getScissorY2() + 1; - const int fb_stride = gstate.FrameBufStride(); + const int fb_stride = std::max(gstate.FrameBufStride(), 4); DEBUG_LOG(SCEGE,"viewport : %ix%i, region : %ix%i , scissor: %ix%i, stride: %i, %i", viewport_width,viewport_height, region_width, region_height, scissor_width, scissor_height, fb_stride, gstate.isModeThrough());