[Mesa-dev] [PATCH] glsl: Allow parsing of explicit_attrib_location keywords in ES 3
Kenneth Graunke
kenneth at whitecape.org
Fri Nov 16 15:22:37 PST 2012
On 11/15/2012 11:25 AM, Matt Turner wrote:
> Fixes draw_buffers_test3 and 6 explicit_attrib_location tests from.
> gles3conform
> ---
> This is how this should be fixed, right? Modifying the table in
> glsl_parser_extras.cpp would have incorrectly allowed
> #extension GL_ARB_explicit_attrib_location : enable
> in GLES 2?
>
> src/glsl/glsl_parser.yy | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/glsl/glsl_parser.yy b/src/glsl/glsl_parser.yy
> index bc4d08a..8acf8c5 100644
> --- a/src/glsl/glsl_parser.yy
> +++ b/src/glsl/glsl_parser.yy
> @@ -1157,7 +1157,7 @@ layout_qualifier_id:
> {
> memset(& $$, 0, sizeof($$));
>
> - if (state->ARB_explicit_attrib_location_enable) {
> + if (state->ARB_explicit_attrib_location_enable || _mesa_is_gles3(state->ctx)) {
> /* FINISHME: Handle 'index' once GL_ARB_blend_func_exteneded and
> * FINISHME: GLSL 1.30 (or later) are supported.
> */
NAK. You can use #version 100 shaders in an ES 3.0 context. Those
shouldn't allow layout qualifiers.
More information about the mesa-dev
mailing list