i965: Define consistent interface to enable instruction result saturation.
v2: Use set_ prefix. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
7624f8410f
commit
6e04065729
|
@ -304,4 +304,15 @@ set_condmod(enum brw_conditional_mod mod, fs_inst *inst)
|
|||
return inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamp the result of \p inst to the saturation range of its destination
|
||||
* datatype.
|
||||
*/
|
||||
static inline fs_inst *
|
||||
set_saturate(bool saturate, fs_inst *inst)
|
||||
{
|
||||
inst->saturate = saturate;
|
||||
return inst;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -223,6 +223,17 @@ set_condmod(enum brw_conditional_mod mod, vec4_instruction *inst)
|
|||
return inst;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clamp the result of \p inst to the saturation range of its destination
|
||||
* datatype.
|
||||
*/
|
||||
inline vec4_instruction *
|
||||
set_saturate(bool saturate, vec4_instruction *inst)
|
||||
{
|
||||
inst->saturate = saturate;
|
||||
return inst;
|
||||
}
|
||||
|
||||
} /* namespace brw */
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue