summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2013-03-28 03:02:14 +0100
committerMarek Olšák <maraeo@gmail.com>2013-04-06 23:57:10 +0200
commit3264c3e99700389f0a3958db7c9c19673107d67a (patch)
tree2c26670d6e2940646f62742d739452ff2e3aa688 /src/mesa/main/attrib.c
parent9d4f67600b0a8f4b37eb2ed45b194e153669d11a (diff)
downloadexternal_mesa3d-3264c3e99700389f0a3958db7c9c19673107d67a.zip
external_mesa3d-3264c3e99700389f0a3958db7c9c19673107d67a.tar.gz
external_mesa3d-3264c3e99700389f0a3958db7c9c19673107d67a.tar.bz2
mesa: allow drivers not to expose ARB_color_buffer_float in GL core profile
Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 3b991bc..a672845 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -986,7 +986,9 @@ _mesa_PopAttrib(void)
_mesa_set_enable(ctx, GL_INDEX_LOGIC_OP,
color->IndexLogicOpEnabled);
_mesa_set_enable(ctx, GL_DITHER, color->DitherFlag);
- _mesa_ClampColor(GL_CLAMP_FRAGMENT_COLOR_ARB, color->ClampFragmentColor);
+ if (ctx->Extensions.ARB_color_buffer_float)
+ _mesa_ClampColor(GL_CLAMP_FRAGMENT_COLOR_ARB,
+ color->ClampFragmentColor);
_mesa_ClampColor(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
/* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
@@ -1114,7 +1116,10 @@ _mesa_PopAttrib(void)
/* materials */
memcpy(&ctx->Light.Material, &light->Material,
sizeof(struct gl_material));
- _mesa_ClampColor(GL_CLAMP_VERTEX_COLOR_ARB, light->ClampVertexColor);
+ if (ctx->Extensions.ARB_color_buffer_float) {
+ _mesa_ClampColor(GL_CLAMP_VERTEX_COLOR_ARB,
+ light->ClampVertexColor);
+ }
}
break;
case GL_LINE_BIT: