mesa: Add _mesa_set_sampler_srgb_decode method
authorIan Romanick <ian.d.romanick@intel.com>
Mon, 9 Nov 2015 20:16:58 +0000 (12:16 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 11 Jan 2016 23:38:03 +0000 (15:38 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/main/samplerobj.c
src/mesa/main/samplerobj.h

index d74435e..62078f8 100644 (file)
@@ -750,6 +750,16 @@ set_sampler_cube_map_seamless(struct gl_context *ctx,
    return GL_TRUE;
 }
 
+void
+_mesa_set_sampler_srgb_decode(struct gl_context *ctx,
+                              struct gl_sampler_object *samp, GLenum param)
+{
+   assert(param == GL_DECODE_EXT || param == GL_SKIP_DECODE_EXT);
+
+   flush(ctx);
+   samp->sRGBDecode = param;
+}
+
 static GLuint
 set_sampler_srgb_decode(struct gl_context *ctx,
                               struct gl_sampler_object *samp, GLenum param)
index c35052e..68a924c 100644 (file)
@@ -89,6 +89,10 @@ _mesa_set_sampler_filters(struct gl_context *ctx,
                           struct gl_sampler_object *samp,
                           GLenum min_filter, GLenum mag_filter);
 
+extern void
+_mesa_set_sampler_srgb_decode(struct gl_context *ctx,
+                              struct gl_sampler_object *samp, GLenum param);
+
 void GLAPIENTRY
 _mesa_GenSamplers(GLsizei count, GLuint *samplers);
 void GLAPIENTRY