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 <paulo.r.zanoni@intel.com> [v2]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
This commit is contained in:
Ian Romanick 2019-05-06 15:45:47 -07:00 committed by Marge Bot
parent 27c2082a42
commit a5d2c40fb9
2 changed files with 8 additions and 11 deletions

View 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,

View File

@ -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 ||