diff options
author | Marek Olšák <[email protected]> | 2013-03-28 03:16:25 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-04-06 23:57:12 +0200 |
commit | 08275b25cc12056f8e40409e0c0ec75326e873fc (patch) | |
tree | a5254f646458d2d1a0515d0a4c23a2178effafed /src/mesa/state_tracker | |
parent | 3264c3e99700389f0a3958db7c9c19673107d67a (diff) |
st/mesa: don't expose ARB_color_buffer_float without driver support in GL core
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 11db9d3f318..2d8b9efec4e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -629,6 +629,7 @@ void st_init_extensions(struct st_context *st) ctx->Const.PrimitiveRestartInSoftware = GL_TRUE; } + /* ARB_color_buffer_float. */ if (screen->get_param(screen, PIPE_CAP_VERTEX_COLOR_UNCLAMPED)) { ctx->Extensions.ARB_color_buffer_float = GL_TRUE; @@ -639,6 +640,16 @@ void st_init_extensions(struct st_context *st) if (!screen->get_param(screen, PIPE_CAP_FRAGMENT_COLOR_CLAMPED)) { st->clamp_frag_color_in_shader = TRUE; } + + /* For drivers which cannot do color clamping, it's better to just + * disable ARB_color_buffer_float in the core profile, because + * the clamping is deprecated there anyway. */ + if (ctx->API == API_OPENGL_CORE && + (st->clamp_frag_color_in_shader || st->clamp_vert_color_in_shader)) { + st->clamp_vert_color_in_shader = GL_FALSE; + st->clamp_frag_color_in_shader = GL_FALSE; + ctx->Extensions.ARB_color_buffer_float = GL_FALSE; + } } if (screen->fence_finish) { |