[Mesa-dev] [PATCH] glsl: Allow parsing of explicit_attrib_location keywords in ES 3
Ian Romanick
idr at freedesktop.org
Fri Nov 16 14:07:18 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?
The way we've handled this for desktop GL is to just set the correct bit
in state.
I also have a patch to add support for row_major. In desktop row_major
is a keyword (handled by the lexer), but in ES it is not. /sigh/
> 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.
> */
>
More information about the mesa-dev
mailing list