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_fs_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_fs_visitor.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 74860711abd..4b48f2db0f2 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -321,6 +321,9 @@ void fs_visitor::emit_minmax(enum brw_conditional_mod conditionalmod, const fs_reg &dst, const fs_reg &src0, const fs_reg &src1) { + assert(conditionalmod == BRW_CONDITIONAL_GE || + conditionalmod == BRW_CONDITIONAL_L); + fs_inst *inst; if (brw->gen >= 6) { @@ -1956,7 +1959,7 @@ fs_visitor::rescale_texcoord(fs_reg coordinate, int coord_components, chan = offset(chan, i); inst = emit(BRW_OPCODE_SEL, chan, chan, fs_reg(0.0f)); - inst->conditional_mod = BRW_CONDITIONAL_G; + inst->conditional_mod = BRW_CONDITIONAL_GE; /* Our parameter comes in as 1.0/width or 1.0/height, * because that's what people normally want for doing |