Mesa (master): mesa: Add _mesa_set_sampler_srgb_decode method
Ian Romanick
idr at kemper.freedesktop.org
Mon Jan 11 23:39:09 UTC 2016
Module: Mesa
Branch: master
Commit: 4cf5c85ec70abb736e9c135e77c221b177d85d12
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4cf5c85ec70abb736e9c135e77c221b177d85d12
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Mon Nov 9 12:16:58 2015 -0800
mesa: Add _mesa_set_sampler_srgb_decode method
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>
---
src/mesa/main/samplerobj.c | 10 ++++++++++
src/mesa/main/samplerobj.h | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index d74435e..62078f8 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -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)
diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h
index c35052e..68a924c 100644
--- a/src/mesa/main/samplerobj.h
+++ b/src/mesa/main/samplerobj.h
@@ -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
More information about the mesa-commit
mailing list