Skip to content

Commit

Permalink
GPU: Ignore viewport for scissor of 481.
Browse files Browse the repository at this point in the history
Assume it's still wrong in this case and take 480x272.  See hrydgard#12746.
  • Loading branch information
unknownbrackets committed May 21, 2020
1 parent 192164c commit cd869d4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions GPU/Common/FramebufferCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,17 @@ void FramebufferManagerCommon::EstimateDrawingSize(u32 fb_address, GEBufferForma
drawing_width = scissor_width;
drawing_height = std::max(drawing_height, scissor_height);
}
if (scissor_width == 481 && region_width == 480 && scissor_height == 273 && region_height == 272) {
drawing_width = 480;
drawing_height = 272;
}
} else {
// If viewport wasn't valid, let's just take the greatest anything regardless of stride.
drawing_width = std::min(std::max(region_width, scissor_width), fb_stride);
drawing_height = std::max(region_height, scissor_height);
}

if (scissor_width == 481 && region_width == 480 && scissor_height == 273 && region_height == 272) {
drawing_width = 480;
drawing_height = 272;
}

// Assume no buffer is > 512 tall, it couldn't be textured or displayed fully if so.
if (drawing_height >= MAX_FRAMEBUF_HEIGHT) {
if (region_height < MAX_FRAMEBUF_HEIGHT) {
Expand Down

0 comments on commit cd869d4

Please sign in to comment.