diff options
author | Marek Olšák <[email protected]> | 2013-03-28 03:02:14 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-04-06 23:57:10 +0200 |
commit | 3264c3e99700389f0a3958db7c9c19673107d67a (patch) | |
tree | 2c26670d6e2940646f62742d739452ff2e3aa688 /src/mesa/main/attrib.c | |
parent | 9d4f67600b0a8f4b37eb2ed45b194e153669d11a (diff) |
mesa: allow drivers not to expose ARB_color_buffer_float in GL core profile
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r-- | src/mesa/main/attrib.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 3b991bcacf2..a672845bf90 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: |