Module: Mesa Branch: main Commit: 580f25a266aa056567104684cfb6cfbb718cf8e6 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=580f25a266aa056567104684cfb6cfbb718cf8e6
Author: Alyssa Rosenzweig <[email protected]> Date: Thu Nov 24 20:40:43 2022 -0500 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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19996> --- src/asahi/compiler/agx_compile.c | 6 +++--- src/asahi/compiler/agx_opcodes.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c index 19fbfbc9ab5..86481ff5f20 100644 --- a/src/asahi/compiler/agx_compile.c +++ b/src/asahi/compiler/agx_compile.c @@ -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); diff --git a/src/asahi/compiler/agx_opcodes.py b/src/asahi/compiler/agx_opcodes.py index d9877f3bc39..75f7f6ff4d2 100644 --- a/src/asahi/compiler/agx_opcodes.py +++ b/src/asahi/compiler/agx_opcodes.py @@ -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
