diff options
author | Marek Olšák <[email protected]> | 2016-09-09 02:04:00 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-16 22:35:08 +0200 |
commit | ae0a4a1299f649ff550a0dfd59d60fc8b91df54f (patch) | |
tree | c24aa6ace2ca65de617d74e5d71829d6a6175a8f /src/compiler/glsl/opt_algebraic.cpp | |
parent | d58a3906cba57b12035f6ec7a3da80edc6929d6f (diff) |
glsl: remove interpolateAt* instructions for demoted inputs
This fixes 8 fs-interpolateat* piglit crashes on radeonsi, because it can't
handle non-input operands in interpolateAt*.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/compiler/glsl/opt_algebraic.cpp')
-rw-r--r-- | src/compiler/glsl/opt_algebraic.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/glsl/opt_algebraic.cpp b/src/compiler/glsl/opt_algebraic.cpp index f5858c83865..2829a782514 100644 --- a/src/compiler/glsl/opt_algebraic.cpp +++ b/src/compiler/glsl/opt_algebraic.cpp @@ -961,6 +961,16 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir) return ir->operands[2]; break; + /* Remove interpolateAt* instructions for demoted inputs. They are + * assigned a constant expression to facilitate this. + */ + case ir_unop_interpolate_at_centroid: + case ir_binop_interpolate_at_offset: + case ir_binop_interpolate_at_sample: + if (op_const[0]) + return ir->operands[0]; + break; + default: break; } |