From a5d2c40fb9c841ab28cc9ab6eebaaac44afa6e4e Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 6 May 2019 15:45:47 -0700 Subject: [PATCH] meta: Make _mesa_meta_setup_sampler static 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 [v2] Reviewed-by: Jason Ekstrand Part-of: --- src/mesa/drivers/common/meta.h | 5 ----- src/mesa/drivers/common/meta_blit.c | 14 ++++++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h index 152bf598835..7894cec7241 100644 --- a/src/mesa/drivers/common/meta.h +++ b/src/mesa/drivers/common/meta.h @@ -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, diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index 8cdd9e98590..a01e33f9a66 100644 --- a/src/mesa/drivers/common/meta_blit.c +++ b/src/mesa/drivers/common/meta_blit.c @@ -54,6 +54,10 @@ 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 || -- 2.30.2