From 0e9dc59a58e632979b3bdebb19d184bd22a0c182 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Thu, 11 Feb 2016 13:41:58 -0800 Subject: i965: Make emit_minmax return an instruction*. And use it in brw_fs_nir.cpp. --- src/mesa/drivers/dri/i965/brw_vec4_builder.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers/dri/i965/brw_vec4_builder.h') diff --git a/src/mesa/drivers/dri/i965/brw_vec4_builder.h b/src/mesa/drivers/dri/i965/brw_vec4_builder.h index a0b390b..3a8617e 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_builder.h +++ b/src/mesa/drivers/dri/i965/brw_vec4_builder.h @@ -299,12 +299,14 @@ namespace brw { * * Generally useful to get the minimum or maximum of two values. */ - void + instruction * emit_minmax(const dst_reg &dst, const src_reg &src0, const src_reg &src1, brw_conditional_mod mod) const { - set_condmod(mod, SEL(dst, fix_unsigned_negate(src0), - fix_unsigned_negate(src1))); + assert(mod == BRW_CONDITIONAL_GE || mod == BRW_CONDITIONAL_L); + + return set_condmod(mod, SEL(dst, fix_unsigned_negate(src0), + fix_unsigned_negate(src1))); } /** -- cgit v1.1