From 74edd56927801e8c646c7d5cddba397c2f54b4ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 12 Jun 2013 21:38:28 +0200 Subject: [PATCH] st/mesa: disable EXT_separate_shader_objects The extension disallows elimination of set-but-unused varyings. Reviewed-by: Ian Romanick --- docs/relnotes/9.2.html | 3 +++ src/mesa/state_tracker/st_extensions.c | 9 ++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/relnotes/9.2.html b/docs/relnotes/9.2.html index 1f49191148e..6809506873d 100644 --- a/docs/relnotes/9.2.html +++ b/docs/relnotes/9.2.html @@ -68,6 +68,9 @@ Note: some of the new features are only available with certain drivers. 2007.
  • Removed GL_MESA_resize_buffers because it was only really implemented by the (unsupported) GDI driver.
  • +
  • GL_EXT_separate_shader_objects has been removed from all Gallium drivers, + because it disallows a critical GLSL shader optimization. + GL_ARB_separate_shader_objects doesn't have this issue. diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index c0ec06a18a1..df0761a80a6 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -554,7 +554,14 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; ctx->Extensions.EXT_point_parameters = GL_TRUE; ctx->Extensions.EXT_provoking_vertex = GL_TRUE; - ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; + + /* IMPORTANT: + * Don't enable EXT_separate_shader_objects. It disallows a certain + * optimization in the GLSL compiler and therefore is considered + * harmful. + */ + ctx->Extensions.EXT_separate_shader_objects = GL_FALSE; + ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;