Fix scissor rectangle being one pixel too small.

This commit is contained in:
Henrik Rydgard 2013-03-16 08:54:39 +01:00
parent b1108f3290
commit f67743b769
2 changed files with 6 additions and 4 deletions

View file

@ -558,7 +558,7 @@ void FramebufferManager::DecimateFBOs() {
}
int age = gpuStats.numFrames - (*iter)->last_frame_used;
if (age > FBO_OLD_AGE) {
INFO_LOG(HLE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format)
INFO_LOG(HLE, "Decimating FBO for %08x (%i x %i x %i), age %i", vfb->fb_address, vfb->width, vfb->height, vfb->format, age)
if (vfb->fbo) {
textureCache_->NotifyFramebufferDestroyed(vfb->fb_address, vfb);
fbo_destroy(vfb->fbo);

View file

@ -260,15 +260,17 @@ void TransformDrawEngine::ApplyDrawState(int prim) {
int scissorY2 = (gstate.scissor2 >> 10) & 0x3FF;
// This is a bit of a hack as the render buffer isn't always that size
if (scissorX1 == 0 && scissorY1 == 0 && scissorX2 == 480 && scissorY2 == 272) {
if (scissorX1 == 0 && scissorY1 == 0 &&
scissorX2 >= gstate_c.curRTWidth - 1 &&
scissorY2 >= gstate_c.curRTHeight - 1) {
glstate.scissorTest.disable();
} else {
glstate.scissorTest.enable();
glstate.scissorRect.set(
renderX + scissorX1 * renderWidthFactor,
renderY + renderHeight - (scissorY2 * renderHeightFactor),
(scissorX2 - scissorX1) * renderWidthFactor,
(scissorY2 - scissorY1) * renderHeightFactor);
(scissorX2 - scissorX1 + 1) * renderWidthFactor,
(scissorY2 - scissorY1 + 1) * renderHeightFactor);
}
/*