From 304d372f4899002f87a4323528a4d43c14373f5d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 2 Jun 2014 21:46:22 -0700 Subject: [PATCH] When clamping height to 512, try region/scissor. --- GPU/GLES/Framebuffer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 1252fa828d..baa70902f4 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -677,7 +677,13 @@ void FramebufferManager::EstimateDrawingSize(int &drawing_width, int &drawing_he } // Assume no buffer is > 512 tall, it couldn't be textured or displayed fully if so. - drawing_height = std::min(drawing_height, 512); + if (drawing_height > 512) { + if (region_height < 512) { + drawing_height = region_height; + } else if (scissor_height < 512) { + drawing_height = scissor_height; + } + } if (viewport_width != region_width) { // The majority of the time, these are equal. If not, let's check what we know.