From: Francisco Jerez Date: Wed, 3 Jun 2015 18:24:18 +0000 (+0300) Subject: i965: Define consistent interface to enable instruction conditional modifiers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7624f8410f64a7ce0ba125a2025904c70610c076;p=mesa.git i965: Define consistent interface to enable instruction conditional modifiers. v2: Use set_ prefix. Reviewed-by: Kenneth Graunke --- diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h index 660bab2c466..07af0082d9d 100644 --- a/src/mesa/drivers/dri/i965/brw_ir_fs.h +++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h @@ -293,4 +293,15 @@ set_predicate(enum brw_predicate pred, fs_inst *inst) return set_predicate_inv(pred, false, inst); } +/** + * Write the result of evaluating the condition given by \p mod to a flag + * register. + */ +static inline fs_inst * +set_condmod(enum brw_conditional_mod mod, fs_inst *inst) +{ + inst->conditional_mod = mod; + return inst; +} + #endif diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h index b9a5a251914..96d1cfbeb93 100644 --- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h @@ -212,6 +212,17 @@ set_predicate(enum brw_predicate pred, vec4_instruction *inst) return set_predicate_inv(pred, false, inst); } +/** + * Write the result of evaluating the condition given by \p mod to a flag + * register. + */ +inline vec4_instruction * +set_condmod(enum brw_conditional_mod mod, vec4_instruction *inst) +{ + inst->conditional_mod = mod; + return inst; +} + } /* namespace brw */ #endif