From e7087175f8a04f777403366fb34b58edd00f4d60 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 21 Sep 2010 18:13:02 -0600 Subject: mesa: don't advertise bogus GL_ARB_shading_language_120 extension Instead of using the invalid GL_ARB_shading_language_120 extension to determine the GLSL version, use a new ctx->Const.GLSLVersion field. Updated the intel and r600 drivers, but untested. See fd.o bug 29910 NOTE: This is a candidate for the 7.9 branch (but let's wait and see if there's any regressions). --- src/mesa/state_tracker/st_extensions.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 4c18c66cc4d..017f6c5cf7e 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -186,6 +186,11 @@ void st_init_limits(struct st_context *st) * attributes) supported by a driver. */ c->MaxVarying = screen->get_shader_param(screen, PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_INPUTS) - 2; c->MaxVarying = MIN2(c->MaxVarying, MAX_VARYING); + + /* XXX we'll need a better query here someday */ + if (screen->get_param(screen, PIPE_CAP_GLSL)) { + c->GLSLVersion = 120; + } } @@ -285,7 +290,6 @@ void st_init_extensions(struct st_context *st) ctx->Extensions.ARB_vertex_shader = GL_TRUE; ctx->Extensions.ARB_shader_objects = GL_TRUE; ctx->Extensions.ARB_shading_language_100 = GL_TRUE; - ctx->Extensions.ARB_shading_language_120 = GL_TRUE; } if (screen->get_param(screen, PIPE_CAP_TEXTURE_MIRROR_REPEAT) > 0) { -- cgit v1.2.3