diff options
author | marha <marha@users.sourceforge.net> | 2013-10-24 08:10:01 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-10-24 08:10:01 +0200 |
commit | 4eb0b643ad978d94837e2d587a5d4358f974a25c (patch) | |
tree | ecb04ee3cf0d7c2fa80707218382d68e7a49f621 /mesalib/src/glsl/glsl_parser.yy | |
parent | 6d895f30ab93d71afddc612d8b007f2de7f04165 (diff) | |
download | vcxsrv-4eb0b643ad978d94837e2d587a5d4358f974a25c.tar.gz vcxsrv-4eb0b643ad978d94837e2d587a5d4358f974a25c.tar.bz2 vcxsrv-4eb0b643ad978d94837e2d587a5d4358f974a25c.zip |
fontconfig mesa xserver git update 24 oct 2013
xserver commit 7ecfab47eb221dbb996ea6c033348b8eceaeb893
fontconfig commit 76ea9af816a50c6bb0b3dc2960460a90fadd9cdb
mesa commit a6e45b6a17462f4d261a2d176791469847356923
Diffstat (limited to 'mesalib/src/glsl/glsl_parser.yy')
-rw-r--r-- | mesalib/src/glsl/glsl_parser.yy | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/mesalib/src/glsl/glsl_parser.yy b/mesalib/src/glsl/glsl_parser.yy index 00589e28e..0a0708e95 100644 --- a/mesalib/src/glsl/glsl_parser.yy +++ b/mesalib/src/glsl/glsl_parser.yy @@ -2372,6 +2372,7 @@ layout_defaults: | layout_qualifier IN_TOK ';' { void *ctx = state; + $$ = NULL; if (state->target != geometry_shader) { _mesa_glsl_error(& @1, state, "input layout qualifiers only valid in " @@ -2380,8 +2381,22 @@ layout_defaults: _mesa_glsl_error(& @1, state, "input layout qualifiers must specify a primitive" " type"); + } else { + /* Make sure this is a valid input primitive type. */ + switch ($1.prim_type) { + case GL_POINTS: + case GL_LINES: + case GL_LINES_ADJACENCY: + case GL_TRIANGLES: + case GL_TRIANGLES_ADJACENCY: + $$ = new(ctx) ast_gs_input_layout(@1, $1.prim_type); + break; + default: + _mesa_glsl_error(&@1, state, + "invalid geometry shader input primitive type"); + break; + } } - $$ = new(ctx) ast_gs_input_layout(@1, $1.prim_type); } | layout_qualifier OUT_TOK ';' @@ -2390,8 +2405,22 @@ layout_defaults: _mesa_glsl_error(& @1, state, "out layout qualifiers only valid in " "geometry shaders"); - } else if (!state->out_qualifier->merge_qualifier(& @1, state, $1)) { - YYERROR; + } else { + if ($1.flags.q.prim_type) { + /* Make sure this is a valid output primitive type. */ + switch ($1.prim_type) { + case GL_POINTS: + case GL_LINE_STRIP: + case GL_TRIANGLE_STRIP: + break; + default: + _mesa_glsl_error(&@1, state, "invalid geometry shader output " + "primitive type"); + break; + } + } + if (!state->out_qualifier->merge_qualifier(& @1, state, $1)) + YYERROR; } $$ = NULL; } |