aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2017-01-16 12:13:50 +0100
committerEmil Velikov <[email protected]>2017-01-20 23:21:06 +0000
commit613154fc8fee89c3791c174363832581ab871580 (patch)
treebb1086b8647d05913712b556ce76eb06cd5f322e /src/mesa
parentff81869f0dcd2210e5f09c2e0e0c116f46952734 (diff)
mesa/main: fix meta caller of _mesa_ClampColor
Since _mesa_ClampColor properly checks for support of the API function now, it's meta callers need to check support as well. Fixes: 963311b71f ("mesa/main: fix version/extension checks in _mesa_ClampColor") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99401 Tested-by: Mark Janes <[email protected]> Reviewed-by: Alejandro Piñeiro <[email protected]> Cc: "17.0" <[email protected]> (cherry picked from commit a7c635ec6589f600f0d52d0097774ea0b938de9f)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/attrib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 9c7f5ed0e58..ada2203ec0b 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1071,7 +1071,8 @@ _mesa_PopAttrib(void)
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);
+ if (ctx->Extensions.ARB_color_buffer_float || ctx->Version >= 30)
+ _mesa_ClampColor(GL_CLAMP_READ_COLOR_ARB, color->ClampReadColor);
/* GL_ARB_framebuffer_sRGB / GL_EXT_framebuffer_sRGB */
if (ctx->Extensions.EXT_framebuffer_sRGB)