gl: Fix framebuffer validity checks

This commit is contained in:
kd-11 2017-07-23 17:11:45 +03:00
parent a24780fe5e
commit cb194e06ce
2 changed files with 9 additions and 3 deletions

View file

@ -838,9 +838,14 @@ bool GLGSRender::do_method(u32 cmd, u32 arg)
{ {
case NV4097_CLEAR_SURFACE: case NV4097_CLEAR_SURFACE:
{ {
init_buffers(true); if (arg & 0xF3)
synchronize_buffers(); {
clear_surface(arg); //Only do all this if we have actual work to do
init_buffers(true);
synchronize_buffers();
clear_surface(arg);
}
return true; return true;
} }
case NV4097_TEXTURE_READ_SEMAPHORE_RELEASE: case NV4097_TEXTURE_READ_SEMAPHORE_RELEASE:

View file

@ -169,6 +169,7 @@ void GLGSRender::init_buffers(bool skip_reading)
{ {
LOG_ERROR(RSX, "Invalid framebuffer setup, w=%d, h=%d", clip_horizontal, clip_vertical); LOG_ERROR(RSX, "Invalid framebuffer setup, w=%d, h=%d", clip_horizontal, clip_vertical);
framebuffer_status_valid = false; framebuffer_status_valid = false;
return;
} }
const auto pitchs = get_pitchs(); const auto pitchs = get_pitchs();