1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

gl: Remember to unbind attachments from active framebuffer after clear

- If a stale reference is left lying around (e.g the texture bound to
depth has been deleted and we attach a color image) no operations
actually take place. glCheckFramebufferStatus also does not catch this
problem.
This commit is contained in:
kd-11 2019-09-29 12:41:58 +03:00 committed by kd-11
parent 0b2fa6ffdc
commit 88229f4716

View File

@ -471,6 +471,7 @@ namespace gl
cmd.drv->color_maski(0, true, true, true, true);
glClear(GL_COLOR_BUFFER_BIT);
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, GL_NONE, 0);
}
void blitter::fast_clear_image(gl::command_context& cmd, const texture* dst, float depth, u8 stencil)
@ -505,5 +506,6 @@ namespace gl
cmd.drv->stencil_mask(0xFF);
glClear(clear_mask);
glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, GL_NONE, 0);
}
}