meta: Make _mesa_meta_setup_sampler static
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 6 May 2019 22:45:47 +0000 (15:45 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 14 May 2020 15:35:43 +0000 (15:35 +0000)
   text     data     bss      dec    hex  filename
12244854 1344936 1290748 14880538 e30f1a  before/lib64/dri/i965_dri.so
12244406 1344936 1290748 14880090 e30d5a  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 152bf5988358c40b69fdfa25b9d7f377706f0563..7894cec72413bd6cbf0c5c3ce1c8e4d6d099e9f6 100644 (file)
@@ -455,11 +455,6 @@ extern void
 _mesa_meta_fb_tex_blit_end(struct gl_context *ctx, GLenum target,
                            struct fb_tex_blit_state *blit);
 
-struct gl_sampler_object *
-_mesa_meta_setup_sampler(struct gl_context *ctx,
-                         struct gl_texture_object *texObj,
-                         GLenum target, GLenum filter, GLuint srcLevel);
-
 extern GLbitfield
 _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
                            const struct gl_framebuffer *readFb,
index 8cdd9e98590260155d414dca59cc4141b694fa93..a01e33f9a660a81b8289becc8e6598a2c141c93e 100644 (file)
 static struct gl_texture_object *
 texture_object_from_renderbuffer(struct gl_context *, struct gl_renderbuffer *);
 
+static struct gl_sampler_object *
+setup_sampler(struct gl_context *, struct gl_texture_object *, GLenum target,
+              GLenum filter, GLuint srcLevel);
+
 /** Return offset in bytes of the field within a vertex struct */
 #define OFFSET(FIELD) ((void *) offsetof(struct vertex, FIELD))
 
@@ -525,8 +529,7 @@ blitframebuffer_texture(struct gl_context *ctx,
      printf("  srcTex %p  dstText %p\n", texObj, drawAtt->Texture);
    */
 
-   fb_tex_blit.samp_obj = _mesa_meta_setup_sampler(ctx, texObj, target, filter,
-                                                   srcLevel);
+   fb_tex_blit.samp_obj = setup_sampler(ctx, texObj, target, filter, srcLevel);
 
    if (ctx->Extensions.EXT_texture_sRGB_decode) {
       /* The GL 4.4 spec, section 18.3.1 ("Blitting Pixel Rectangles") says:
@@ -713,10 +716,9 @@ texture_object_from_renderbuffer(struct gl_context *ctx,
    return texObj;
 }
 
-struct gl_sampler_object *
-_mesa_meta_setup_sampler(struct gl_context *ctx,
-                         struct gl_texture_object *texObj,
-                         GLenum target, GLenum filter, GLuint srcLevel)
+static struct gl_sampler_object *
+setup_sampler(struct gl_context *ctx, struct gl_texture_object *texObj,
+              GLenum target, GLenum filter, GLuint srcLevel)
 {
    struct gl_sampler_object *samp_obj;
    GLenum tex_filter = (filter == GL_SCALED_RESOLVE_FASTEST_EXT ||