meta: Use internal functions for renderbuffer access
authorIan Romanick <ian.d.romanick@intel.com>
Thu, 12 Nov 2015 17:29:34 +0000 (09:29 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Wed, 10 Feb 2016 18:59:53 +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/common/meta.c
src/mesa/drivers/common/meta_copy_image.c

index 217d376281f39640d3d9bd2f4c18c9230f6bed0f..9fc7bc6a6b6618304aec1c638fed44f76b7774d3 100644 (file)
@@ -3074,10 +3074,8 @@ decompress_texture_image(struct gl_context *ctx,
 
       _mesa_GenFramebuffers(1, &decompress_fbo->FBO);
       _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, decompress_fbo->FBO);
-      _mesa_FramebufferRenderbuffer(GL_FRAMEBUFFER_EXT,
-                                       GL_COLOR_ATTACHMENT0_EXT,
-                                       GL_RENDERBUFFER_EXT,
-                                       decompress_fbo->rb->Name);
+      _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, GL_COLOR_ATTACHMENT0,
+                                     decompress_fbo->rb);
    }
    else {
       _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, decompress_fbo->FBO);
@@ -3085,8 +3083,8 @@ decompress_texture_image(struct gl_context *ctx,
 
    /* alloc dest surface */
    if (width > decompress_fbo->Width || height > decompress_fbo->Height) {
-      _mesa_NamedRenderbufferStorage(decompress_fbo->rb->Name, rbFormat,
-                                     width, height);
+      _mesa_renderbuffer_storage(ctx, decompress_fbo->rb, rbFormat,
+                                 width, height, 0);
       status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
       if (status != GL_FRAMEBUFFER_COMPLETE) {
          /* If the framebuffer isn't complete then we'll leave
index 2c2b7ba6bf8573622ca4b447ac467c4f01a35552..6534d432e614e40ea920edf1fdf0f7163177622b 100644 (file)
@@ -241,10 +241,8 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
       _mesa_meta_bind_fbo_image(GL_READ_FRAMEBUFFER, attachment,
                                 src_view_tex_image, src_z);
    } else {
-      _mesa_FramebufferRenderbuffer(GL_READ_FRAMEBUFFER,
-                                    attachment,
-                                    GL_RENDERBUFFER,
-                                    src_renderbuffer->Name);
+      _mesa_framebuffer_renderbuffer(ctx, ctx->ReadBuffer, attachment,
+                                     src_renderbuffer);
    }
 
    status = _mesa_CheckFramebufferStatus(GL_READ_FRAMEBUFFER);
@@ -252,10 +250,8 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
       goto meta_end;
 
    if (dst_renderbuffer) {
-      _mesa_FramebufferRenderbuffer(GL_DRAW_FRAMEBUFFER,
-                                    attachment,
-                                    GL_RENDERBUFFER,
-                                    dst_renderbuffer->Name);
+      _mesa_framebuffer_renderbuffer(ctx, ctx->DrawBuffer, attachment,
+                                     dst_renderbuffer);
    } else {
       _mesa_meta_bind_fbo_image(GL_DRAW_FRAMEBUFFER, attachment,
                                 dst_tex_image, dst_z);