summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-10-22 16:37:35 -0700
committerKristian H. Kristensen <[email protected]>2019-11-07 16:36:53 -0800
commit77b96b843e4d58a1462976dacf6ae314de815881 (patch)
tree5a881061e644e3bf171030b5f2cffa186fbc2b7d
parent41984c84227a37b6836a57a39348c70b49457212 (diff)
freedreno/ir3: Use imul24 in offset calculations
With the imul24 opcode in place, we can now use it for computing local offsets (ie for ldlw/stlw). Signed-off-by: Kristian H. Kristensen <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Rob Clark <[email protected]>
-rw-r--r--src/freedreno/ir3/ir3_nir_lower_tess.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/freedreno/ir3/ir3_nir_lower_tess.c b/src/freedreno/ir3/ir3_nir_lower_tess.c
index b4982503f0d..acbb02d4108 100644
--- a/src/freedreno/ir3/ir3_nir_lower_tess.c
+++ b/src/freedreno/ir3/ir3_nir_lower_tess.c
@@ -85,7 +85,7 @@ build_local_offset(nir_builder *b, struct state *state,
{
nir_ssa_def *primitive_stride = nir_load_vs_primitive_stride_ir3(b);
nir_ssa_def *primitive_offset =
- nir_imul(b, build_local_primitive_id(b, state), primitive_stride);
+ nir_imul24(b, build_local_primitive_id(b, state), primitive_stride);
nir_ssa_def *attr_offset;
nir_ssa_def *vertex_stride;
@@ -99,7 +99,7 @@ build_local_offset(nir_builder *b, struct state *state,
unreachable("bad shader stage");
}
- nir_ssa_def *vertex_offset = nir_imul(b, vertex, vertex_stride);
+ nir_ssa_def *vertex_offset = nir_imul24(b, vertex, vertex_stride);
return nir_iadd(b, nir_iadd(b, primitive_offset, vertex_offset),
nir_iadd(b, attr_offset, offset));