st/mesa: make convert_sampler_from_unit() non-static
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Tue, 9 May 2017 12:07:24 +0000 (14:07 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 14 Jun 2017 08:04:36 +0000 (10:04 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_atom_sampler.c
src/mesa/state_tracker/st_texture.h

index f33e334bb9ec862e8a4a91409d42519c158b3004..c6d992fbb0e5d14c199952c1bc9656968dda97a3 100644 (file)
@@ -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;
       }
index 3931cbad5a636036ef336d215c086a983fa59850..cd6a73c7703941e7acd96e777b285fb35db46bf3 100644 (file)
@@ -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,