nir,agx: make block image store an image() intrinsic
so we can do a bindless version Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30981>
This commit is contained in:

committed by
Marge Bot

parent
4941d71846
commit
afc7557cb6
@@ -1356,7 +1356,7 @@ agx_emit_intrinsic(agx_builder *b, nir_intrinsic_instr *instr)
|
||||
case nir_intrinsic_bindless_image_store:
|
||||
return agx_emit_image_store(b, instr);
|
||||
|
||||
case nir_intrinsic_block_image_store_agx:
|
||||
case nir_intrinsic_image_store_block_agx:
|
||||
return agx_emit_block_image_store(b, instr);
|
||||
|
||||
case nir_intrinsic_load_workgroup_id:
|
||||
|
@@ -168,7 +168,7 @@ agx_build_end_of_tile_shader(struct agx_bg_eot_cache *cache,
|
||||
if (key->tib.layered)
|
||||
layer = nir_u2u16(&b, nir_load_layer_id(&b));
|
||||
|
||||
nir_block_image_store_agx(
|
||||
nir_image_store_block_agx(
|
||||
&b, nir_imm_int(&b, rt), nir_imm_intN_t(&b, offset_B, 16), layer,
|
||||
.format = agx_tilebuffer_physical_format(&key->tib, rt),
|
||||
.image_dim = dim, .image_array = key->tib.layered);
|
||||
|
@@ -2619,6 +2619,7 @@ nir_rewrite_image_intrinsic(nir_intrinsic_instr *intrin, nir_def *src,
|
||||
CASE(load_raw_intel)
|
||||
CASE(store_raw_intel)
|
||||
CASE(fragment_mask_load_amd)
|
||||
CASE(store_block_agx)
|
||||
#undef CASE
|
||||
default:
|
||||
unreachable("Unhanded image intrinsic");
|
||||
|
@@ -1961,9 +1961,8 @@ intrinsic("store_zs_agx", [1, 1, 1], indices=[BASE], flags=[])
|
||||
# The image dimension is used to distinguish multisampled images from
|
||||
# non-multisampled images. It must be 2D or MS.
|
||||
#
|
||||
# src[] = { image index, logical offset within shared memory, coordinates/layer }
|
||||
intrinsic("block_image_store_agx", [1, 1, -1], bit_sizes=[32, 16, 0],
|
||||
indices=[FORMAT, IMAGE_DIM, IMAGE_ARRAY, EXPLICIT_COORD], flags=[])
|
||||
# extra src[] = { logical offset within shared memory, coordinates/layer }
|
||||
image("store_block_agx", [1, -1], extra_indices=[EXPLICIT_COORD])
|
||||
|
||||
# Formatted load/store. The format is the pipe_format in memory (see
|
||||
# agx_internal_formats.h for the supported list). This accesses:
|
||||
|
@@ -214,7 +214,7 @@ asahi_blit_compute_shader(struct pipe_context *ctx, struct asahi_blit_key *key)
|
||||
nir_push_if(b, nir_ball(b, nir_ieq_imm(b, lid, 0)));
|
||||
{
|
||||
nir_def *pbe_index = nir_imm_int(b, 2);
|
||||
nir_block_image_store_agx(
|
||||
nir_image_store_block_agx(
|
||||
b, pbe_index, local_offset, image_pos_nd, .format = tib_format,
|
||||
.image_dim = GLSL_SAMPLER_DIM_2D, .image_array = key->array,
|
||||
.explicit_coord = true);
|
||||
|
Reference in New Issue
Block a user