mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
Fix a FBO render offset bug.
The current code failed if the dri drawable was updated before the call to intelFlush(), and typically rendered into an FBO using the back buffer cliprects.
This commit is contained in:
parent
71bce51324
commit
5dbadd418c
2 changed files with 3 additions and 10 deletions
|
|
@ -425,15 +425,6 @@ static void
|
|||
intel_bind_framebuffer(GLcontext * ctx, GLenum target,
|
||||
struct gl_framebuffer *fb)
|
||||
{
|
||||
/*
|
||||
_mesa_debug(ctx, "%s %d\n", __FUNCTION__, fb->Name);
|
||||
*/
|
||||
/* XXX FBO: putting this flush here fixes a rendering offset bug.
|
||||
* Not sure why this is needed when _mesa_BindFrameBuffer does
|
||||
* a FLUSH_VERTICES().
|
||||
*/
|
||||
intelFlush(ctx);
|
||||
|
||||
if (target == GL_FRAMEBUFFER_EXT || target == GL_DRAW_FRAMEBUFFER_EXT) {
|
||||
intel_draw_buffer(ctx, fb);
|
||||
/* Integer depth range depends on depth buffer bits */
|
||||
|
|
|
|||
|
|
@ -972,7 +972,9 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
|
|||
}
|
||||
|
||||
FLUSH_VERTICES(ctx, _NEW_BUFFERS);
|
||||
|
||||
if (ctx->Driver.Flush) {
|
||||
ctx->Driver.Flush(ctx);
|
||||
}
|
||||
if (framebuffer) {
|
||||
/* Binding a user-created framebuffer object */
|
||||
newFb = _mesa_lookup_framebuffer(ctx, framebuffer);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue