diff options
author | Matt Turner <[email protected]> | 2015-02-09 21:11:46 -0800 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-02-19 21:16:43 -0800 |
commit | 3b7f683f3bbbd93e417a6f42ec7c609465be49de (patch) | |
tree | 6b73bc4235c54df0ee39cb52fd4f1d9ecbb0f9c2 /src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | |
parent | f8b435ae6a27fa2274ff166639b22d0b36d68c49 (diff) |
i965: Use greater-equal cmod to implement maximum.
The docs specifically call out SEL with .l and .ge as the
implementations of MIN and MAX respectively. Among other things, SEL
with these conditional mods are commutative.
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 6154e43c1a4..be071d74baa 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -517,7 +517,7 @@ vec4_visitor::emit_unpack_snorm_4x8(const dst_reg &dst, src_reg src0) emit(MUL(scaled, src_reg(f), src_reg(1.0f / 127.0f))); dst_reg max(this, glsl_type::vec4_type); - emit_minmax(BRW_CONDITIONAL_G, max, src_reg(scaled), src_reg(-1.0f)); + emit_minmax(BRW_CONDITIONAL_GE, max, src_reg(scaled), src_reg(-1.0f)); emit_minmax(BRW_CONDITIONAL_L, dst, src_reg(max), src_reg(1.0f)); } @@ -545,7 +545,7 @@ void vec4_visitor::emit_pack_snorm_4x8(const dst_reg &dst, const src_reg &src0) { dst_reg max(this, glsl_type::vec4_type); - emit_minmax(BRW_CONDITIONAL_G, max, src0, src_reg(-1.0f)); + emit_minmax(BRW_CONDITIONAL_GE, max, src0, src_reg(-1.0f)); dst_reg min(this, glsl_type::vec4_type); emit_minmax(BRW_CONDITIONAL_L, min, src_reg(max), src_reg(1.0f)); @@ -1683,7 +1683,7 @@ vec4_visitor::visit(ir_expression *ir) emit_minmax(BRW_CONDITIONAL_L, result_dst, op[0], op[1]); break; case ir_binop_max: - emit_minmax(BRW_CONDITIONAL_G, result_dst, op[0], op[1]); + emit_minmax(BRW_CONDITIONAL_GE, result_dst, op[0], op[1]); break; case ir_binop_pow: |