agx: simplify block image store offset

just make 32-bit offset.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36257>
This commit is contained in:
Alyssa Rosenzweig
2025-07-17 13:47:27 -04:00
committed by Marge Bot
parent cbbc24a473
commit 2dd91b0d1c
4 changed files with 4 additions and 9 deletions
-5
View File
@@ -897,11 +897,6 @@ agx_emit_block_image_store(agx_builder *b, nir_intrinsic_instr *instr)
enum agx_dim dim = agx_tex_dim(nir_intrinsic_image_dim(instr), array);
bool explicit = nir_intrinsic_explicit_coord(instr);
/* 32-bit source physically, 16-bit in NIR, top half ignored but needed
* logically to ensure alignment.
*/
offset = agx_pad_to_32(b, offset);
/* Modified coordinate descriptor */
if (!explicit) {
if (array) {
+2 -2
View File
@@ -172,8 +172,8 @@ agx_build_end_of_tile_shader(struct agx_bg_eot_cache *cache,
layer = nir_u2u16(&b, nir_load_layer_id(&b));
nir_image_store_block_agx(
&b, nir_imm_intN_t(&b, rt, 16), nir_imm_intN_t(&b, offset_B, 16),
layer, .format = agx_tilebuffer_physical_format(&key->tib, rt),
&b, nir_imm_intN_t(&b, rt, 16), nir_imm_int(&b, offset_B), layer,
.format = agx_tilebuffer_physical_format(&key->tib, rt),
.image_dim = dim, .image_array = key->tib.layered);
}
+1 -1
View File
@@ -490,7 +490,7 @@ build_image_copy_shader(const struct vk_meta_image_copy_key *key)
assert(isa_format != PIPE_FORMAT_NONE);
}
nir_def *local_offset = nir_imm_intN_t(b, 0, 16);
nir_def *local_offset = nir_imm_int(b, 0);
nir_def *lid = nir_trim_vector(b, nir_load_local_invocation_id(b), 2);
lid = nir_u2u16(b, lid);
+1 -1
View File
@@ -166,7 +166,7 @@ asahi_blit_compute_shader(struct pipe_context *ctx, struct asahi_blit_key *key)
else if (clamp == ASAHI_BLIT_CLAMP_UINT_TO_SINT)
color = nir_umin(b, color, nir_imm_int(b, INT32_MAX));
nir_def *local_offset = nir_imm_intN_t(b, 0, 16);
nir_def *local_offset = nir_imm_int(b, 0);
nir_def *lid = nir_trim_vector(b, nir_load_local_invocation_id(b), 2);
lid = nir_u2u16(b, lid);