aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-03-30 23:00:15 -0500
committerMarge Bot <[email protected]>2020-04-03 20:26:54 +0000
commitf1883cc73d4ea2c6d3a73dfe55c8b346f3ef8ac6 (patch)
tree3d91ea12426606a257562bb2d40864f7f80e1fea /src/gallium/drivers/iris
parent4c8b1003889bfb0f708d91dc7caa08a37f9caef4 (diff)
iris: Set alignments on cbuf0 and constant reads
Reviewed-by: Ian Romanick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4367>
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r--src/gallium/drivers/iris/iris_program.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index de335cd9803..436c7b81551 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -432,6 +432,9 @@ iris_setup_uniforms(const struct brw_compiler *compiler,
load_ubo->num_components = intrin->num_components;
load_ubo->src[0] = nir_src_for_ssa(temp_const_ubo_name);
load_ubo->src[1] = nir_src_for_ssa(offset);
+ nir_intrinsic_set_align(load_ubo,
+ nir_intrinsic_align_mul(intrin),
+ nir_intrinsic_align_offset(intrin));
nir_ssa_dest_init(&load_ubo->instr, &load_ubo->dest,
intrin->dest.ssa.num_components,
intrin->dest.ssa.bit_size,
@@ -524,6 +527,7 @@ iris_setup_uniforms(const struct brw_compiler *compiler,
load->num_components = comps;
load->src[0] = nir_src_for_ssa(temp_ubo_name);
load->src[1] = nir_src_for_ssa(offset);
+ nir_intrinsic_set_align(load, 4, 0);
nir_ssa_dest_init(&load->instr, &load->dest, comps, 32, NULL);
nir_builder_instr_insert(&b, &load->instr);
nir_ssa_def_rewrite_uses(&intrin->dest.ssa,