From a988ddf3798e0ec568704e4a72b46030079c7e45 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 10 Jan 2011 13:37:38 +1000 Subject: mesa/swrast: handle sRGB FBOs correctly (v2) From reading EXT_texture_sRGB and EXT_framebuffer_sRGB and interactions with FBO I've found that swrast is converting the sRGB values to linear for blending when an sRGB texture is bound as an FBO. According to the spec and further explained in the framebuffer_sRGB spec this behaviour is not required unless the GL_FRAMEBUFFER_SRGB is enabled and the Visual/config exposes GL_FRAMEBUFFER_SRGB_CAPABLE_EXT. This patch fixes swrast to use a separate Fetch call for FBOs bound to SRGB and avoid the conversions. v2: export _mesa_get_texture_dimensions as per Brian's comments. Signed-off-by: Dave Airlie --- src/mesa/main/texfetch.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/main/texfetch.h') diff --git a/src/mesa/main/texfetch.h b/src/mesa/main/texfetch.h index ef13bf27fe..e78079ae5a 100644 --- a/src/mesa/main/texfetch.h +++ b/src/mesa/main/texfetch.h @@ -34,6 +34,9 @@ extern StoreTexelFunc _mesa_get_texel_store_func(gl_format format); +extern FetchTexelFuncF +_mesa_get_texel_fetch_func(gl_format format, GLuint dims); + extern void _mesa_set_fetch_functions(struct gl_texture_image *texImage, GLuint dims); -- cgit v1.2.3