i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.
authorEric Anholt <eric@anholt.net>
Sat, 22 Sep 2012 15:25:20 +0000 (17:25 +0200)
committerEric Anholt <eric@anholt.net>
Mon, 8 Oct 2012 15:38:49 +0000 (08:38 -0700)
commitd81d7a4b65565a873338f54b0a17795d91ccc625
treec7dfb3fd667ee8a9acc171f90659ea05fe0b94a8
parent5c268745465640b4b8504d1e7f79efb25b67cd7a
i965/fs: Pull ir_binop_min/ir_binop_max handling to a separate function.

This will be reused from the ARB_fp compiler.  I touched up the pre-gen6 path
to not overwrite dst in the first instruction, which prevents the need for
aliasing checks (we'll need that in the ARB_fp compiler, but it actually
hasn't been needed in this codebase since the revert of the nasty old
MOV-avoidance code).  I also made the conditional_mod between gen6 and
pre-gen6 consistent, which shouldn't matter except for denorm/(+/-)0
comparisons where the choice between left and right hand side of the
comparison changes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_visitor.cpp