From 27c2082a4238eeece5fb36d948ae96301d5ae506 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 6 May 2019 15:05:26 -0700 Subject: [PATCH] meta: Make _mesa_meta_texture_object_from_renderbuffer static 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 [v2] Reviewed-by: Jason Ekstrand Part-of: --- src/mesa/drivers/common/meta.h | 4 ---- src/mesa/drivers/common/meta_blit.c | 11 +++++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h index d4c50305356..152bf598835 100644 --- a/src/mesa/drivers/common/meta.h +++ b/src/mesa/drivers/common/meta.h @@ -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, diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c index dfa215aa384..8cdd9e98590 100644 --- a/src/mesa/drivers/common/meta_blit.c +++ b/src/mesa/drivers/common/meta_blit.c @@ -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; -- 2.30.2