mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 21:00:16 +01:00
glsl: Accept language version 100 and make it the default on ES2.
This commit is contained in:
parent
814c89abdb
commit
719caa403e
4 changed files with 255 additions and 242 deletions
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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue