mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 10:18:40 +12: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:
parent
0b2fa6ffdc
commit
88229f4716
1 changed files with 2 additions and 0 deletions
|
@ -471,6 +471,7 @@ namespace gl
|
||||||
cmd.drv->color_maski(0, true, true, true, true);
|
cmd.drv->color_maski(0, true, true, true, true);
|
||||||
|
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
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)
|
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);
|
cmd.drv->stencil_mask(0xFF);
|
||||||
|
|
||||||
glClear(clear_mask);
|
glClear(clear_mask);
|
||||||
|
glFramebufferTexture2D(GL_FRAMEBUFFER, attachment, GL_TEXTURE_2D, GL_NONE, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue