glsl: Allow compatibility shaders with MESA_GL_VERSION_OVERRIDE=...
authorMatt Turner <mattst88@gmail.com>
Tue, 31 Jan 2017 23:41:52 +0000 (15:41 -0800)
committerMatt Turner <mattst88@gmail.com>
Thu, 9 Feb 2017 15:14:43 +0000 (15:14 +0000)
commitd7a0486a9e4e71d98c694872815909b8f8c0d3ac
tree29c381b39aae8999c3312dbdf6e08a0d8e88cb94
parent89b4176eb15625d915716fae88e74b62fc994b4d
glsl: Allow compatibility shaders with MESA_GL_VERSION_OVERRIDE=...

Previously if you used MESA_GL_VERSION_OVERRIDE=3.3COMPAT, Mesa exposed
an OpenGL 3.3 compatibility profile context (with various unimplemented
features and bugs), but still refused to compile shaders with

   #version 330 compatibility

This patch simply adds a small bit of plumbing to let that through.

Of course the same caveats apply: compatibility profile is still not
supported (and will not be supported), so there are no guarantees that
anything will work.

Tested-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/glsl/builtin_types.cpp
src/compiler/glsl/builtin_variables.cpp
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/glsl_parser_extras.h