summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_lower_alu_to_scalar.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-06-13 14:41:05 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-06-20 12:02:55 -0700
commitbec07b729242f6a2dcf5a12ce75bf8b07ea658e0 (patch)
treecfcabe3b44458974809f0088357f8b02b3396f9c /src/compiler/nir/nir_lower_alu_to_scalar.c
parent202751fbb7e3d35c1aa84f325f862245dab67f6c (diff)
downloadexternal_mesa3d-bec07b729242f6a2dcf5a12ce75bf8b07ea658e0.zip
external_mesa3d-bec07b729242f6a2dcf5a12ce75bf8b07ea658e0.tar.gz
external_mesa3d-bec07b729242f6a2dcf5a12ce75bf8b07ea658e0.tar.bz2
nir/alu_to_scalar: Respect the exact ALU operation qualifier
Just setting builder->exact isn't sufficient because that only applies to instructions that are built with the builder but instructions created manually and only inserted using the builder are left alone. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-stable@lists.freedesktop.org>
Diffstat (limited to 'src/compiler/nir/nir_lower_alu_to_scalar.c')
-rw-r--r--src/compiler/nir/nir_lower_alu_to_scalar.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_alu_to_scalar.c b/src/compiler/nir/nir_lower_alu_to_scalar.c
index b491791..4f72cf7 100644
--- a/src/compiler/nir/nir_lower_alu_to_scalar.c
+++ b/src/compiler/nir/nir_lower_alu_to_scalar.c
@@ -56,6 +56,7 @@ lower_reduction(nir_alu_instr *instr, nir_op chan_op, nir_op merge_op,
nir_alu_src_copy(&chan->src[1], &instr->src[1], chan);
chan->src[1].swizzle[0] = chan->src[1].swizzle[i];
}
+ chan->exact = instr->exact;
nir_builder_instr_insert(builder, &chan->instr);
@@ -229,6 +230,7 @@ lower_alu_instr_scalar(nir_alu_instr *instr, nir_builder *b)
nir_alu_ssa_dest_init(lower, 1, instr->dest.dest.ssa.bit_size);
lower->dest.saturate = instr->dest.saturate;
comps[chan] = &lower->dest.dest.ssa;
+ lower->exact = instr->exact;
nir_builder_instr_insert(b, &lower->instr);
}