summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Marek <[email protected]>2019-06-02 15:16:06 -0400
committerJonathan Marek <[email protected]>2019-06-03 12:46:14 +0000
commit91672becc3a0403ebf8bc149636ee92646e2df7f (patch)
treea6f8ce99bc3f63bedb5265761cad8311a7e0f365
parent6970a9a6ca9ea26a9e6cf968d3fec3565bef2e9b (diff)
nir: copy intrinsic type when lowering load input/uniform and store output
Fixes: c1275052 "nir: add type information to load uniform/input and store output intrinsics" Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Erico Nunes <[email protected]> Tested-by: Erico Nunes <[email protected]> Tested-by: Andreas Baierl <[email protected]>
-rw-r--r--src/compiler/nir/nir_lower_io_to_scalar.c2
-rw-r--r--src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_lower_io_to_scalar.c b/src/compiler/nir/nir_lower_io_to_scalar.c
index 559d80b214a..1277a8a7373 100644
--- a/src/compiler/nir/nir_lower_io_to_scalar.c
+++ b/src/compiler/nir/nir_lower_io_to_scalar.c
@@ -49,6 +49,7 @@ lower_load_input_to_scalar(nir_builder *b, nir_intrinsic_instr *intr)
nir_intrinsic_set_base(chan_intr, nir_intrinsic_base(intr));
nir_intrinsic_set_component(chan_intr, nir_intrinsic_component(intr) + i);
+ nir_intrinsic_set_type(chan_intr, nir_intrinsic_type(intr));
/* offset */
nir_src_copy(&chan_intr->src[0], &intr->src[0], chan_intr);
@@ -81,6 +82,7 @@ lower_store_output_to_scalar(nir_builder *b, nir_intrinsic_instr *intr)
nir_intrinsic_set_base(chan_intr, nir_intrinsic_base(intr));
nir_intrinsic_set_write_mask(chan_intr, 0x1);
nir_intrinsic_set_component(chan_intr, nir_intrinsic_component(intr) + i);
+ nir_intrinsic_set_type(chan_intr, nir_intrinsic_type(intr));
/* value */
chan_intr->src[0] = nir_src_for_ssa(nir_channel(b, value, i));
diff --git a/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c b/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
index 2bea90cef78..3b110370277 100644
--- a/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
+++ b/src/gallium/drivers/lima/ir/lima_nir_lower_uniform_to_scalar.c
@@ -41,6 +41,7 @@ lower_load_uniform_to_scalar(nir_builder *b, nir_intrinsic_instr *intr)
nir_intrinsic_set_base(chan_intr, nir_intrinsic_base(intr) * 4 + i);
nir_intrinsic_set_range(chan_intr, nir_intrinsic_range(intr) * 4);
+ nir_intrinsic_set_type(chan_intr, nir_intrinsic_type(intr));
chan_intr->src[0] =
nir_src_for_ssa(nir_fmul_imm(b, intr->src[0].ssa, 4));