From: Kenneth Graunke Date: Tue, 15 Jul 2014 23:34:56 +0000 (-0700) Subject: glsl: Make the tree rebalancer bail on matrix operands. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9697f8088f9e1c1b1f1b39b57a26ac4bd21b247f;p=mesa.git glsl: Make the tree rebalancer bail on matrix operands. It doesn't handle things like (vector * matrix) correctly, and apparently Matt's intention was to bail. Fixes shader compilation in Natural Selection 2. Signed-off-by: Kenneth Graunke --- diff --git a/src/glsl/opt_rebalance_tree.cpp b/src/glsl/opt_rebalance_tree.cpp index daabdc9fa99..7ef0d2db392 100644 --- a/src/glsl/opt_rebalance_tree.cpp +++ b/src/glsl/opt_rebalance_tree.cpp @@ -217,7 +217,9 @@ is_reduction(ir_instruction *ir, void *data) * constant fold once split up. Handling matrices will need some more * work. */ - if (expr->type->is_matrix()) { + if (expr->type->is_matrix() || + expr->operands[0]->type->is_matrix() || + (expr->operands[1] && expr->operands[1]->type->is_matrix())) { ird->is_reduction = false; return; }