glsl: Accept language version 100 and make it the default on ES2.
This commit is contained in:
+244
-242
File diff suppressed because it is too large
Load Diff
@@ -222,6 +222,8 @@ version_statement:
|
||||
| VERSION INTCONSTANT EOL
|
||||
{
|
||||
switch ($2) {
|
||||
case 100:
|
||||
state->es_shader = true;
|
||||
case 110:
|
||||
case 120:
|
||||
case 130:
|
||||
|
||||
@@ -54,9 +54,17 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct __GLcontextRec *ctx,
|
||||
|
||||
/* Set default language version and extensions */
|
||||
this->language_version = 110;
|
||||
this->es_shader = false;
|
||||
this->ARB_texture_rectangle_enable = true;
|
||||
|
||||
if (ctx != NULL) {
|
||||
/* OpenGL ES 2.0 has different defaults from desktop GL. */
|
||||
if (ctx->API == API_OPENGLES2) {
|
||||
this->language_version = 100;
|
||||
this->es_shader = true;
|
||||
this->ARB_texture_rectangle_enable = false;
|
||||
}
|
||||
|
||||
this->extensions = &ctx->Extensions;
|
||||
|
||||
this->Const.MaxLights = ctx->Const.MaxLights;
|
||||
|
||||
@@ -68,6 +68,7 @@ struct _mesa_glsl_parse_state {
|
||||
exec_list translation_unit;
|
||||
glsl_symbol_table *symbols;
|
||||
|
||||
bool es_shader;
|
||||
unsigned language_version;
|
||||
enum _mesa_glsl_parser_targets target;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user