Also fixes spec/ARB_gpu_shader5/execution/invocations-conflicting
Apparently my baseline... wasnt. On Sat, Jun 28, 2014 at 11:18 AM, Ilia Mirkin <[email protected]> wrote: > On Fri, Jun 27, 2014 at 5:21 AM, Chris Forbes <[email protected]> wrote: >> If another layout qualifier appeared to the left of `invocations` in the >> GS input layout declaration, the invocation count would be dropped on >> the floor. >> >> Fixes the piglit test: >> >> spec/ARB_transform_feedback3/arb_transform_feedback3-ext_interleaved_two_bufs_gs_max >> >> Signed-off-by: Chris Forbes <[email protected]> >> Cc: Ilia Mirkin <[email protected]> > > Tested-by: Ilia Mirkin <[email protected]> > > Also fixes arb_gpu_shader5-invocation-id > >> --- >> >> Note that the handling of the special rules for layout declarations in >> general is a bit of a disaster -- merge_in_qualifier tries to do the right >> thing, but merge_qualifier still ends up coming into play in various cases. >> It's probably better to dispose of the distinction within the parser, and >> disallow qualifiers appearing in the wrong contexts later. (This is what is >> already done to disallow layout-declaration-only qualifiers on variables) >> >> src/glsl/ast_type.cpp | 10 ++++++++++ >> 1 file changed, 10 insertions(+) >> >> diff --git a/src/glsl/ast_type.cpp b/src/glsl/ast_type.cpp >> index 77053d5..ddd1f4e 100644 >> --- a/src/glsl/ast_type.cpp >> +++ b/src/glsl/ast_type.cpp >> @@ -154,6 +154,16 @@ ast_type_qualifier::merge_qualifier(YYLTYPE *loc, >> this->max_vertices = q.max_vertices; >> } >> >> + if (q.flags.q.invocations) { >> + if (this->flags.q.invocations && this->invocations != q.invocations) { >> + _mesa_glsl_error(loc, state, >> + "geometry shader set conflicting invocations " >> + "(%d and %d)", this->invocations, q.invocations); >> + return false; >> + } >> + this->invocations = q.invocations; >> + } >> + >> if ((q.flags.i & ubo_mat_mask.flags.i) != 0) >> this->flags.i &= ~ubo_mat_mask.flags.i; >> if ((q.flags.i & ubo_layout_mask.flags.i) != 0) >> -- >> 2.0.0 >> _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
