mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 04:48:08 +02:00
glsl: Add support for parsing #version 140.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
99cd475cc9
commit
ac5a5b3243
4 changed files with 8 additions and 0 deletions
|
|
@ -264,6 +264,9 @@ version_statement:
|
|||
case 130:
|
||||
supported = state->Const.GLSL_130;
|
||||
break;
|
||||
case 140:
|
||||
supported = state->Const.GLSL_140;
|
||||
break;
|
||||
default:
|
||||
supported = false;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *ctx,
|
|||
&& (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);
|
||||
|
||||
const unsigned lowest_version =
|
||||
(ctx->API == API_OPENGLES2) || ctx->Extensions.ARB_ES2_compatibility
|
||||
|
|
|
|||
|
|
@ -132,6 +132,7 @@ struct _mesa_glsl_parse_state {
|
|||
unsigned GLSL_110:1;
|
||||
unsigned GLSL_120:1;
|
||||
unsigned GLSL_130:1;
|
||||
unsigned GLSL_140:1;
|
||||
/*@}*/
|
||||
} Const;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ shading_language_version(struct gl_context *ctx)
|
|||
return (const GLubyte *) "1.20";
|
||||
case 130:
|
||||
return (const GLubyte *) "1.30";
|
||||
case 140:
|
||||
return (const GLubyte *) "1.40";
|
||||
default:
|
||||
_mesa_problem(ctx,
|
||||
"Invalid GLSL version in shading_language_version()");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue