mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 05:40:13 +01:00
i965/peephole_ffma: Only match a mul+add if none of the ops are exact
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
eb93d6dec8
commit
88ef2476dc
1 changed files with 11 additions and 0 deletions
|
|
@ -84,6 +84,17 @@ get_mul_for_src(nir_alu_src *src, int num_components,
|
|||
return NULL;
|
||||
|
||||
nir_alu_instr *alu = nir_instr_as_alu(instr);
|
||||
|
||||
/* We want to bail if any of the other ALU operations involved is labled
|
||||
* exact. One reason for this is that, while the value that is changing is
|
||||
* actually the result of the add and not the multiply, the intention of
|
||||
* the user when they specify an exact multiply is that they want *that*
|
||||
* value and what they don't care about is the add. Another reason is that
|
||||
* SPIR-V explicitly requires this behaviour.
|
||||
*/
|
||||
if (alu->exact)
|
||||
return NULL;
|
||||
|
||||
switch (alu->op) {
|
||||
case nir_op_imov:
|
||||
case nir_op_fmov:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue