mesa: remove ctx->Const.sRGBCapable
authorMarek Olšák <maraeo@gmail.com>
Tue, 24 Jan 2012 22:39:31 +0000 (23:39 +0100)
committerMarek Olšák <maraeo@gmail.com>
Wed, 25 Jan 2012 11:35:37 +0000 (12:35 +0100)
It always had the same value as ctx->Extensions.EXT_framebuffer_sRGB.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/main/fbobject.c
src/mesa/main/framebuffer.c
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_cb_fbo.c
src/mesa/state_tracker/st_extensions.c

index ffd953683e7a6dd025972a4b7eb87441adb580ff..81ba6a195eae16a6014f3ff2d0fc7e560d54d28e 100644 (file)
@@ -697,7 +697,6 @@ intelInitContext(struct intel_context *intel,
    _mesa_init_point(ctx);
 
    if (intel->gen >= 4) {
-      ctx->Const.sRGBCapable = true;
       if (MAX_WIDTH > 8192)
         ctx->Const.MaxRenderbufferSize = 8192;
    } else {
index 79a97291fbb7df0ed87371797bbc11d0abbb1120..987d687b902ea364d3d141442e6e0e5f1310acc2 100644 (file)
@@ -2405,7 +2405,7 @@ _mesa_GetFramebufferAttachmentParameterivEXT(GLenum target, GLenum attachment,
                      "glGetFramebufferAttachmentParameterivEXT(pname)");
       }
       else {
-         if (ctx->Extensions.EXT_framebuffer_sRGB && ctx->Const.sRGBCapable) {
+         if (ctx->Extensions.EXT_framebuffer_sRGB) {
             *params = _mesa_get_format_color_encoding(att->Renderbuffer->Format);
          }
          else {
index 7c3c4e3456c7dcc54d45dd9bce43214dc2a5285e..ea14148de1d96c9e06eb4c8941156ad5c42b1b4b 100644 (file)
@@ -527,7 +527,7 @@ _mesa_update_framebuffer_visual(struct gl_context *ctx,
             fb->Visual.samples = rb->NumSamples;
             fb->Visual.sampleBuffers = rb->NumSamples > 0 ? 1 : 0;
             if (_mesa_get_format_color_encoding(fmt) == GL_SRGB)
-                fb->Visual.sRGBCapable = ctx->Const.sRGBCapable;
+                fb->Visual.sRGBCapable = ctx->Extensions.EXT_framebuffer_sRGB;
             break;
          }
       }
index 76011317224775323f02fd741d92e491daf64c80..a2b01d05d2215b1d05f3626e0e8158ee19faba77 100644 (file)
@@ -2808,9 +2808,6 @@ struct gl_constants
    /** GL_EXT_gpu_shader4 */
    GLint MinProgramTexelOffset, MaxProgramTexelOffset;
 
-   /* GL_EXT_framebuffer_sRGB */
-   GLboolean sRGBCapable; /* can enable sRGB blend/update on FBOs */
-
    /* GL_ARB_robustness */
    GLenum ResetStrategy;
 
index fefd93a4b3c106856ae73a809cef101bbd06c36c..1cbc0d606bfc1a92185f16aac292cf42cc604584 100644 (file)
@@ -471,7 +471,7 @@ st_validate_attachment(struct gl_context *ctx,
    /* If the encoding is sRGB and sRGB rendering cannot be enabled,
     * check for linear format support instead.
     * Later when we create a surface, we change the format to a linear one. */
-   if (!ctx->Const.sRGBCapable &&
+   if (!ctx->Extensions.EXT_framebuffer_sRGB &&
        _mesa_get_format_color_encoding(texFormat) == GL_SRGB) {
       const gl_format linearFormat = _mesa_get_srgb_format_linear(texFormat);
       format = st_mesa_format_to_pipe_format(linearFormat);
index 809d6c170c14c1435f688b7eaa6758ed02cbdec2..49709d34260e62b496a356a2a5e40e446436c8f1 100644 (file)
@@ -425,7 +425,6 @@ void st_init_extensions(struct st_context *st)
                                    PIPE_TEXTURE_2D, 0,
                                    PIPE_BIND_RENDER_TARGET)) {
          ctx->Extensions.EXT_framebuffer_sRGB = GL_TRUE;
-         ctx->Const.sRGBCapable = GL_TRUE;
       }
    }