mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
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 <hoegsberg@google.com> Acked-by: Eric Anholt <eric@anholt.net> Reviewed-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
41984c8422
commit
77b96b843e
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue