meta: Make _mesa_meta_texture_object_from_renderbuffer static
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 6 May 2019 22:05:26 +0000 (15:05 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 14 May 2020 15:35:43 +0000 (15:35 +0000)
   text     data     bss      dec    hex  filename
12244974 1344936 1290748 14880658 e30f92  before/lib64/dri/i965_dri.so
12244854 1344936 1290748 14880538 e30f1a  after/lib64/dri/i965_dri.so

v2: Put static on the function definition too.  Suggested by Paulo.

v3: Reformat prototype.  Suggested by Jason.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v2]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>

src/mesa/drivers/common/meta.h
src/mesa/drivers/common/meta_blit.c

index d4c50305356f5357ecf6f38c7eecda23245d4853..152bf5988358c40b69fdfa25b9d7f377706f0563 100644 (file)
@@ -455,10 +455,6 @@ extern void
 _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
                            struct fb_tex_blit_state *blit);
 
-extern struct gl_texture_object *
-_mesa_meta_texture_object_from_renderbuffer(struct gl_context *ctx,
-                                            struct gl_renderbuffer *rb);
-
 struct gl_sampler_object *
 _mesa_meta_setup_sampler(struct gl_context *ctx,
                          struct gl_texture_object *texObj,
index dfa215aa384702c924472ce04b5873b96baefe4b..8cdd9e98590260155d414dca59cc4141b694fa93 100644 (file)
@@ -51,6 +51,9 @@
 #include "drivers/common/meta.h"
 #include "util/ralloc.h"
 
+static struct gl_texture_object *
+texture_object_from_renderbuffer(struct gl_context *, struct gl_renderbuffer *);
+
 /** Return offset in bytes of the field within a vertex struct */
 #define OFFSET(FIELD) ((void *) offsetof(struct vertex, FIELD))
 
@@ -444,7 +447,7 @@ blitframebuffer_texture(struct gl_context *ctx,
       srcLevel = readAtt->TextureLevel;
       texObj = readAtt->Texture;
    } else if (!readAtt->Texture && ctx->Driver.BindRenderbufferTexImage) {
-      texObj = _mesa_meta_texture_object_from_renderbuffer(ctx, rb);
+      texObj = texture_object_from_renderbuffer(ctx, rb);
       if (texObj == NULL)
          return false;
 
@@ -685,9 +688,9 @@ _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
    _mesa_delete_nameless_texture(ctx, blit->temp_tex_obj);
 }
 
-struct gl_texture_object *
-_mesa_meta_texture_object_from_renderbuffer(struct gl_context *ctx,
-                                            struct gl_renderbuffer *rb)
+static struct gl_texture_object *
+texture_object_from_renderbuffer(struct gl_context *ctx,
+                                 struct gl_renderbuffer *rb)
 {
    struct gl_texture_image *texImage;
    struct gl_texture_object *texObj;