On Tue, 2016-06-07 at 15:20 +1000, Dave Airlie wrote: > From: Dave Airlie <airl...@redhat.com> > > This fixes: > GL45-CTS.shader_subroutine.subroutines_cannot_be_assigned_float_int_values_or_be_compared > > though I'm not 100% sure why this is illegal from the spec, > but it makes us pass the test, and I really can't see a use case for this. > > Signged-off-by: Dave Airlie <airl...@redhat.com> > --- > src/compiler/glsl/ast_to_hir.cpp | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/src/compiler/glsl/ast_to_hir.cpp > b/src/compiler/glsl/ast_to_hir.cpp > index b7192b2..fbd3256 100644 > --- a/src/compiler/glsl/ast_to_hir.cpp > +++ b/src/compiler/glsl/ast_to_hir.cpp > @@ -1484,6 +1484,12 @@ ast_expression::do_hir(exec_list *instructions, > "operand of type 'void' or a right operand of type " > "'void'", (this->oper == ast_equal) ? "==" : "!="); > error_emitted = true; > + } else if (op[0]->type->is_subroutine() || > op[1]->type->is_subroutine()) {
Shouldn't we use type->contains_subroutine() ? That way we would be having into account subroutine arrays too. Other than the open discussion about whether this is allowed by the specs or not, this is: Reviewed-by: Andres Gomez <ago...@igalia.com> -- Br, Andres _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev