meta: Don't save or restore the renderbuffer binding
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 11 Nov 2015 22:34:11 +0000 (14:34 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Feb 2016 18:59:40 +0000 (10:59 -0800)
Nothing left in meta does anything with the RBO binding, so we don't
need to save or restore it.  The FBO binding is still modified.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/common/meta.c
src/mesa/drivers/common/meta.h

index 26867d3969df6cc406a22771526084feb0c7d18e..b42a3cf16aec28e2be4b3d9a9aeeec5556e0e372 100644 (file)
@@ -848,8 +848,6 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
 
       save->DrawBufferName = ctx->DrawBuffer->Name;
       save->ReadBufferName = ctx->ReadBuffer->Name;
-      save->RenderbufferName = (ctx->CurrentRenderbuffer ?
-                                ctx->CurrentRenderbuffer->Name : 0);
    }
 }
 
@@ -1241,10 +1239,6 @@ _mesa_meta_end(struct gl_context *ctx)
    if (ctx->ReadBuffer->Name != save->ReadBufferName)
       _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, save->ReadBufferName);
 
-   if (!ctx->CurrentRenderbuffer ||
-       ctx->CurrentRenderbuffer->Name != save->RenderbufferName)
-      _mesa_BindRenderbuffer(GL_RENDERBUFFER, save->RenderbufferName);
-
    if (state & MESA_META_DRAW_BUFFERS) {
       _mesa_drawbuffers(ctx, ctx->DrawBuffer, ctx->Const.MaxDrawBuffers,
                         save->ColorDrawBuffers, NULL);
index 074f70da6cdccf81d3d6cf06d2a9d10d7ff98980..3ff0fdddb59a4bd4a9c96acd1280435ab01caf3a 100644 (file)
@@ -186,7 +186,7 @@ struct save_state
    GLboolean RasterDiscard;
    GLboolean TransformFeedbackNeedsResume;
 
-   GLuint DrawBufferName, ReadBufferName, RenderbufferName;
+   GLuint DrawBufferName, ReadBufferName;
 
    /** MESA_META_DRAW_BUFFERS */
    GLenum ColorDrawBuffers[MAX_DRAW_BUFFERS];