i965/meta: Use internal functions for renderbuffer access
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 12 Nov 2015 00:35:05 +0000 (16:35 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Feb 2016 18:59:44 +0000 (10:59 -0800)
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_fast_clear.c
src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c
src/mesa/drivers/dri/i965/brw_meta_updownsample.c

index 51dbd00..38a505a 100644 (file)
@@ -857,9 +857,8 @@ brw_meta_resolve_color(struct brw_context *brw,
    rb = brw_get_rb_for_slice(brw, mt, 0, 0, false);
 
    _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
-   _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER,
-                                 GL_COLOR_ATTACHMENT0,
-                                 GL_RENDERBUFFER, rb->Name);
+   _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, GL_COLOR_ATTACHMENT0,
+                                  rb);
    _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0);
 
    brw_fast_clear_init(brw);
index 4f3f7db..16412ad 100644 (file)
@@ -442,8 +442,8 @@ brw_meta_stencil_blit(struct brw_context *brw,
    adjust_tiling(&dims, dst_mt->num_samples);
 
    _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fbo);
-   _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0,
-                                 GL_RENDERBUFFER, rb->Name);
+   _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, GL_COLOR_ATTACHMENT0,
+                                  rb);
    _mesa_DrawBuffer(GL_COLOR_ATTACHMENT0);
    ctx->DrawBuffer->_Status = GL_FRAMEBUFFER_COMPLETE;
 
@@ -546,8 +546,8 @@ brw_meta_stencil_updownsample(struct brw_context *brw,
    rb = brw_get_rb_for_slice(brw, src, 0, 0, false);
 
    _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, fbo);
-   _mesa_FramebufferRenderbuffer(GL_READ_FRAMEBUFFER, GL_STENCIL_ATTACHMENT,
-                                 GL_RENDERBUFFER, rb->Name);
+   _mesa_framebuffer_renderbuffer(ctx, ctx->ReadBuffer, GL_STENCIL_ATTACHMENT,
+                                  rb);
 
    brw_meta_stencil_blit(brw, dst, 0, 0, &dims);
    brw_emit_mi_flush(brw);
index c1631ae..149f4bc 100644 (file)
@@ -127,13 +127,11 @@ brw_meta_updownsample(struct brw_context *brw,
    dst_fbo = fbos[1];
 
    _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER, src_fbo);
-   _mesa_FramebufferRenderbuffer(GL_READ_FRAMEBUFFER, attachment,
-                                 GL_RENDERBUFFER, src_rb->Name);
+   _mesa_framebuffer_renderbuffer(ctx, ctx->ReadBuffer, attachment, src_rb);
    _mesa_ReadBuffer(drawbuffer);
 
    _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, dst_fbo);
-   _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER, attachment,
-                                 GL_RENDERBUFFER, dst_rb->Name);
+   _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, attachment, dst_rb);
    _mesa_DrawBuffer(drawbuffer);
 
    _mesa_BlitFramebuffer(0, 0,