i965: Define consistent interface to predicate an instruction.
v2: Use set_ prefix. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
f9367191b3
commit
239dfc5410
|
@ -271,4 +271,26 @@ set_sechalf(fs_inst *inst)
|
|||
return inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the execution of \p inst dependent on the evaluation of a possibly
|
||||
* inverted predicate.
|
||||
*/
|
||||
static inline fs_inst *
|
||||
set_predicate_inv(enum brw_predicate pred, bool inverse,
|
||||
fs_inst *inst)
|
||||
{
|
||||
inst->predicate = pred;
|
||||
inst->predicate_inverse = inverse;
|
||||
return inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the execution of \p inst dependent on the evaluation of a predicate.
|
||||
*/
|
||||
static inline fs_inst *
|
||||
set_predicate(enum brw_predicate pred, fs_inst *inst)
|
||||
{
|
||||
return set_predicate_inv(pred, false, inst);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -190,6 +190,28 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Make the execution of \p inst dependent on the evaluation of a possibly
|
||||
* inverted predicate.
|
||||
*/
|
||||
inline vec4_instruction *
|
||||
set_predicate_inv(enum brw_predicate pred, bool inverse,
|
||||
vec4_instruction *inst)
|
||||
{
|
||||
inst->predicate = pred;
|
||||
inst->predicate_inverse = inverse;
|
||||
return inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make the execution of \p inst dependent on the evaluation of a predicate.
|
||||
*/
|
||||
inline vec4_instruction *
|
||||
set_predicate(enum brw_predicate pred, vec4_instruction *inst)
|
||||
{
|
||||
return set_predicate_inv(pred, false, inst);
|
||||
}
|
||||
|
||||
} /* namespace brw */
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue