On 07/27/2012 02:45 PM, Jordan Justen wrote:
Signed-off-by: Jordan Justen jordan.l.jus...@intel.com
---
src/glsl/glsl_parser_extras.cpp | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/src/glsl/glsl_parser_extras.cpp b/src/glsl/glsl_parser_extras.cpp
index df40459..7e85f41 100644
--- a/src/glsl/glsl_parser_extras.cpp
+++ b/src/glsl/glsl_parser_extras.cpp
@@ -90,19 +90,17 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct
gl_context *_ctx,
*/
this-Const.GLSL_100ES = (ctx-API == API_OPENGLES2)
|| ctx-Extensions.ARB_ES2_compatibility;
- this-Const.GLSL_110 = (ctx-API == API_OPENGL);
- this-Const.GLSL_120 = (ctx-API == API_OPENGL)
- (ctx-Const.GLSLVersion = 120);
- this-Const.GLSL_130 = (ctx-API == API_OPENGL)
- (ctx-Const.GLSLVersion = 130);
- this-Const.GLSL_140 = (ctx-API == API_OPENGL)
- (ctx-Const.GLSLVersion = 140);
+ bool is_desktop_gl = _mesa_is_desktop_gl(ctx);
+ this-Const.GLSL_110 = is_desktop_gl;
+ this-Const.GLSL_120 = is_desktop_gl (ctx-Const.GLSLVersion = 120);
+ this-Const.GLSL_130 = is_desktop_gl (ctx-Const.GLSLVersion = 130);
+ this-Const.GLSL_140 = is_desktop_gl (ctx-Const.GLSLVersion = 140);
const unsigned lowest_version =
(ctx-API == API_OPENGLES2) || ctx-Extensions.ARB_ES2_compatibility
? 100 : 110;
const unsigned highest_version =
- (ctx-API == API_OPENGL) ? ctx-Const.GLSLVersion : 100;
+ is_desktop_gl ? ctx-Const.GLSLVersion : 100;
char *supported = ralloc_strdup(this, );
for (unsigned ver = lowest_version; ver = highest_version; ver += 10) {
This conflicts with my patch to make all these bitfields go away, but
I'll let you go first and I'll rebase against your code. It won't be hard.
For the series:
Reviewed-by: Kenneth Graunke kenn...@whitecape.org
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev