Fix the indirect postprocessing path. Fixes #12133 (but see the issue for a secondary bug).

This commit is contained in:
Henrik Rydgård 2019-08-04 18:00:33 +02:00
parent 4d6d12965b
commit 96a15cf525
4 changed files with 4 additions and 3 deletions

View File

@ -985,7 +985,6 @@ void FramebufferManagerCommon::CopyDisplayToOutput() {
CalculatePostShaderUniforms(vfb->bufferWidth, vfb->bufferHeight, renderWidth_, renderHeight_, &uniforms);
BindPostShader(uniforms);
DrawTextureFlags flags = g_Config.iBufFilter == SCALE_LINEAR ? DRAWTEX_LINEAR : DRAWTEX_NEAREST;
flags = flags | DRAWTEX_TO_BACKBUFFER;
DrawActiveTexture(0, 0, fbo_w, fbo_h, fbo_w, fbo_h, 0.0f, 0.0f, 1.0f, 1.0f, ROTATION_LOCKED_HORIZONTAL, flags);
draw_->SetScissorRect(0, 0, pixelWidth_, pixelHeight_);
@ -1008,6 +1007,7 @@ void FramebufferManagerCommon::CopyDisplayToOutput() {
flags = flags | DRAWTEX_TO_BACKBUFFER;
// Fullscreen Image
SetViewport2D(0, 0, pixelWidth_, pixelHeight_);
draw_->SetScissorRect(0, 0, pixelWidth_, pixelHeight_);
DrawActiveTexture(x, y, w, h, (float)pixelWidth_, (float)pixelHeight_, u0, v0, u1, v1, uvRotation, flags);
} else {
shaderManager_->DirtyLastShader(); // dirty lastShader_ BEFORE drawing

View File

@ -305,8 +305,8 @@ void FramebufferManagerVulkan::DrawActiveTexture(float x, float y, float w, floa
if ((flags & DRAWTEX_TO_BACKBUFFER) && g_display_rotation != DisplayRotation::ROTATE_0) {
for (int i = 0; i < 4; i++) {
// backwards notation, should fix that...
Vec3 v(vtx[i].x, vtx[i].y, 0.0f);
// backwards notation, should fix that...
v = v * g_display_rot_matrix;
vtx[i].x = v.x;
vtx[i].y = v.y;

View File

@ -982,6 +982,7 @@ void NativeRender(GraphicsContext *graphicsContext) {
break;
}
// Compensate for rotated display if needed.
if (g_display_rotation != DisplayRotation::ROTATE_0) {
ortho = ortho * g_display_rot_matrix;
}

View File

@ -645,7 +645,7 @@ extern "C" void JNICALL Java_org_ppsspp_ppsspp_NativeApp_backbufferResize(JNIEnv
ILOG("Size change detected (previously %d,%d) - calling NativeResized()", old_w, old_h);
NativeResized();
} else {
ILOG("Size didn't change.");
ILOG("NativeApp::backbufferReisze: Size didn't change.");
}
}