diff options
| author | marha <marha@users.sourceforge.net> | 2011-12-14 14:08:20 +0100 | 
|---|---|---|
| committer | marha <marha@users.sourceforge.net> | 2011-12-14 14:08:20 +0100 | 
| commit | 7c06219c5953076ef3236b6a8959b99329c77ee9 (patch) | |
| tree | c4b00bb9d592afcdffdb3e98c7c7320e29488adb /mesalib/src/glsl | |
| parent | 2b5652fc7742c5ac57aca701214b046626a729e9 (diff) | |
| parent | 53d28537755790ee4625dc16f560cad5aa93f56b (diff) | |
| download | vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.tar.gz vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.tar.bz2 vcxsrv-7c06219c5953076ef3236b6a8959b99329c77ee9.zip | |
Merge remote-tracking branch 'origin/released'
Conflicts:
	mesalib/src/mapi/glapi/gen/EXT_gpu_shader4.xml
	mesalib/src/mapi/glapi/gen/glX_proto_recv.py
	mesalib/src/mapi/glapi/gen/glX_proto_size.py
	mesalib/src/mapi/glapi/gen/gl_gentable.py
	mesalib/src/mapi/glapi/gen/gl_table.py
Diffstat (limited to 'mesalib/src/glsl')
| -rw-r--r-- | mesalib/src/glsl/glsl_parser.yy | 6 | ||||
| -rw-r--r-- | mesalib/src/glsl/linker.cpp | 43 | 
2 files changed, 39 insertions, 10 deletions
| diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy index 71ab039d6..8a0377f49 100644 --- a/mesalib/src/glsl/glsl_parser.yy +++ b/mesalib/src/glsl/glsl_parser.yy @@ -32,6 +32,12 @@  #define YYLEX_PARAM state->scanner +#undef yyerror + +static void yyerror(YYLTYPE *loc, _mesa_glsl_parse_state *st, const char *msg) +{ +   _mesa_glsl_error(loc, st, "%s", msg); +}  %}  %pure-parser diff --git a/mesalib/src/glsl/linker.cpp b/mesalib/src/glsl/linker.cpp index 35270881a..b8a7126e3 100644 --- a/mesalib/src/glsl/linker.cpp +++ b/mesalib/src/glsl/linker.cpp @@ -1815,18 +1815,34 @@ assign_varying_locations(struct gl_context *ctx,     if (ctx->API == API_OPENGLES2 || prog->Version == 100) {        if (varying_vectors > ctx->Const.MaxVarying) { -	 linker_error(prog, "shader uses too many varying vectors " -		      "(%u > %u)\n", -		      varying_vectors, ctx->Const.MaxVarying); -	 return false; +         if (ctx->Const.GLSLSkipStrictMaxVaryingLimitCheck) { +            linker_warning(prog, "shader uses too many varying vectors " +                           "(%u > %u), but the driver will try to optimize " +                           "them out; this is non-portable out-of-spec " +                           "behavior\n", +                           varying_vectors, ctx->Const.MaxVarying); +         } else { +            linker_error(prog, "shader uses too many varying vectors " +                         "(%u > %u)\n", +                         varying_vectors, ctx->Const.MaxVarying); +            return false; +         }        }     } else {        const unsigned float_components = varying_vectors * 4;        if (float_components > ctx->Const.MaxVarying * 4) { -	 linker_error(prog, "shader uses too many varying components " -		      "(%u > %u)\n", -		      float_components, ctx->Const.MaxVarying * 4); -	 return false; +         if (ctx->Const.GLSLSkipStrictMaxVaryingLimitCheck) { +            linker_warning(prog, "shader uses too many varying components " +                           "(%u > %u), but the driver will try to optimize " +                           "them out; this is non-portable out-of-spec " +                           "behavior\n", +                           float_components, ctx->Const.MaxVarying * 4); +         } else { +            linker_error(prog, "shader uses too many varying components " +                         "(%u > %u)\n", +                         float_components, ctx->Const.MaxVarying * 4); +            return false; +         }        }     } @@ -1960,8 +1976,15 @@ check_resources(struct gl_context *ctx, struct gl_shader_program *prog)        }        if (sh->num_uniform_components > max_uniform_components[i]) { -         linker_error(prog, "Too many %s shader uniform components", -		      shader_names[i]); +         if (ctx->Const.GLSLSkipStrictMaxUniformLimitCheck) { +            linker_warning(prog, "Too many %s shader uniform components, " +                           "but the driver will try to optimize them out; " +                           "this is non-portable out-of-spec behavior\n", +                           shader_names[i]); +         } else { +            linker_error(prog, "Too many %s shader uniform components", +                         shader_names[i]); +         }        }     } | 
