From 32b4aa34999c756e82d69472c67dbdd01e1f4fb0 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 9 May 2017 14:07:24 +0200 Subject: [PATCH] st/mesa: make convert_sampler_from_unit() non-static MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Samuel Pitoiset Reviewed-by: Nicolai Hähnle Reviewed-by: Marek Olšák --- src/mesa/state_tracker/st_atom_sampler.c | 14 ++++++++------ src/mesa/state_tracker/st_texture.h | 5 +++++ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index f33e334..c6d992f 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c +++ b/src/mesa/state_tracker/st_atom_sampler.c @@ -230,11 +230,13 @@ st_convert_sampler(const struct st_context *st, ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; } - -static void -convert_sampler_from_unit(const struct st_context *st, - struct pipe_sampler_state *sampler, - GLuint texUnit) +/** + * Get a pipe_sampler_state object from a texture unit. + */ +void +st_convert_sampler_from_unit(const struct st_context *st, + struct pipe_sampler_state *sampler, + GLuint texUnit) { const struct gl_texture_object *texobj; struct gl_context *ctx = st->ctx; @@ -282,7 +284,7 @@ update_shader_samplers(struct st_context *st, if (samplers_used & 1) { const GLuint texUnit = prog->SamplerUnits[unit]; - convert_sampler_from_unit(st, sampler, texUnit); + st_convert_sampler_from_unit(st, sampler, texUnit); states[unit] = sampler; *num_samplers = unit + 1; } diff --git a/src/mesa/state_tracker/st_texture.h b/src/mesa/state_tracker/st_texture.h index 3931cba..cd6a73c 100644 --- a/src/mesa/state_tracker/st_texture.h +++ b/src/mesa/state_tracker/st_texture.h @@ -273,6 +273,11 @@ st_convert_sampler(const struct st_context *st, const struct gl_sampler_object *msamp, struct pipe_sampler_state *sampler); +void +st_convert_sampler_from_unit(const struct st_context *st, + struct pipe_sampler_state *sampler, + GLuint texUnit); + GLboolean st_update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view, -- 2.7.4