i965/meta: Use _mesa_CreateRenderbuffers instead of _mesa_GenRenderbuffers and _mesa_...
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 11 Nov 2015 22:29:18 +0000 (14:29 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Feb 2016 18:59:33 +0000 (10:59 -0800)
This has the advantage that it does not pollute the global binding
state.  It also enables later patches that will stop calling
_mesa_GenRenderbuffers / _mesa_CreateRenderbuffers which pollute the
renderbuffer namespace.

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

index f39d50a69e6691ec4c27bae2ca86665e349d24a0..563160e599b5e39ac2956700ac49b080565c69e8 100644 (file)
@@ -55,13 +55,12 @@ brw_get_rb_for_slice(struct brw_context *brw,
    struct gl_renderbuffer *rb;
    struct intel_renderbuffer *irb;
 
-   /* This turns the GenRenderbuffers name into an actual struct
+   /* This turns the CreateRenderbuffers name into an actual struct
     * intel_renderbuffer.
     */
-   _mesa_GenRenderbuffers(1, &rbo);
-   _mesa_BindRenderbuffer(GL_RENDERBUFFER, rbo);
+   _mesa_CreateRenderbuffers(1, &rbo);
 
-   rb = ctx->CurrentRenderbuffer;
+   rb = _mesa_lookup_renderbuffer(ctx, rbo);
    irb = intel_renderbuffer(rb);
 
    rb->Format = mt->format;