mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-28 04:20:40 +02:00
agx: Add shift to device_load
We'll use this as an optimization soon. This acts in addition to the format's shift. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996>
This commit is contained in:
parent
19a0db31eb
commit
580f25a266
2 changed files with 4 additions and 4 deletions
|
|
@ -397,7 +397,7 @@ agx_emit_load_attr(agx_builder *b, agx_index dest, nir_intrinsic_instr *instr)
|
|||
unsigned actual_comps = (attrib.nr_comps_minus_1 + 1);
|
||||
agx_index vec = agx_vec_for_dest(b->shader, &instr->dest);
|
||||
agx_device_load_to(b, vec, base, offset, attrib.format,
|
||||
BITFIELD_MASK(attrib.nr_comps_minus_1 + 1), 0);
|
||||
BITFIELD_MASK(attrib.nr_comps_minus_1 + 1), 0, 0);
|
||||
agx_wait(b, 0);
|
||||
|
||||
agx_index dests[4] = { agx_null() };
|
||||
|
|
@ -568,7 +568,7 @@ agx_emit_load_global(agx_builder *b, agx_index dest, nir_intrinsic_instr *instr)
|
|||
enum agx_format fmt = agx_format_for_bits(nir_dest_bit_size(instr->dest));
|
||||
|
||||
agx_device_load_to(b, dest, addr, offset, fmt,
|
||||
BITFIELD_MASK(nir_dest_num_components(instr->dest)), 0);
|
||||
BITFIELD_MASK(nir_dest_num_components(instr->dest)), 0, 0);
|
||||
agx_wait(b, 0);
|
||||
agx_emit_cached_split(b, dest, nir_dest_num_components(instr->dest));
|
||||
}
|
||||
|
|
@ -602,7 +602,7 @@ agx_emit_load_ubo(agx_builder *b, agx_index dst, nir_intrinsic_instr *instr)
|
|||
*/
|
||||
agx_device_load_to(b, dst, agx_mov(b, base), agx_src_index(offset),
|
||||
agx_format_for_bits(nir_dest_bit_size(instr->dest)),
|
||||
BITFIELD_MASK(instr->num_components), 0);
|
||||
BITFIELD_MASK(instr->num_components), 0, 0);
|
||||
agx_wait(b, 0);
|
||||
agx_emit_cached_split(b, dst, instr->num_components);
|
||||
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ op("texture_load",
|
|||
# sources are base, index
|
||||
op("device_load",
|
||||
encoding_32 = (0x05, 0x7F, 6, 8),
|
||||
srcs = 2, imms = [FORMAT, MASK, SCOREBOARD], can_reorder = False)
|
||||
srcs = 2, imms = [FORMAT, MASK, SHIFT, SCOREBOARD], can_reorder = False)
|
||||
|
||||
# sources are value, index
|
||||
# TODO: Consider permitting the short form
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue