mesa: Allow glGetTexParameter of GL_TEXTURE_SRGB_DECODE_EXT
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 18 Sep 2012 13:19:18 +0000 (15:19 +0200)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 20 Sep 2012 09:42:56 +0000 (11:42 +0200)
This was already (correctly) supported for glGetSamplerParameter paths.

NOTE: This is a candidate for stable branches.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/texparam.c

index 63a63b732a5a47c3ecc305ef71a8769c2f1f53f6..f73e2b5f022859118c384362d61a26f017115caf 100644 (file)
@@ -1440,6 +1440,12 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
          *params = (GLfloat) obj->Immutable;
          break;
 
+      case GL_TEXTURE_SRGB_DECODE_EXT:
+         if (!ctx->Extensions.EXT_texture_sRGB_decode)
+            goto invalid_pname;
+         *params = (GLfloat) obj->Sampler.sRGBDecode;
+         break;
+
       default:
          goto invalid_pname;
    }
@@ -1612,6 +1618,12 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
          *params = obj->RequiredTextureImageUnits;
          break;
 
+      case GL_TEXTURE_SRGB_DECODE_EXT:
+         if (!ctx->Extensions.EXT_texture_sRGB_decode)
+            goto invalid_pname;
+         *params = obj->Sampler.sRGBDecode;
+         break;
+
       default:
          goto invalid_pname;
    }