asahi: use zero/scratch page for null textures

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35797>
This commit is contained in:
Alyssa Rosenzweig 2025-04-24 11:43:52 -04:00 committed by Marge Bot
parent db2891ec5f
commit fa21722f1c
3 changed files with 4 additions and 4 deletions

View file

@ -233,7 +233,7 @@ agx_set_null_texture(struct agx_texture_packed *tex)
}
static void
agx_set_null_pbe(struct agx_pbe_packed *pbe, uint64_t sink)
agx_set_null_pbe(struct agx_pbe_packed *pbe)
{
agx_pack(pbe, PBE, cfg) {
cfg.width = 1;
@ -246,7 +246,7 @@ agx_set_null_pbe(struct agx_pbe_packed *pbe, uint64_t sink)
cfg.swizzle_g = AGX_CHANNEL_R;
cfg.swizzle_b = AGX_CHANNEL_R;
cfg.swizzle_a = AGX_CHANNEL_R;
cfg.buffer = sink;
cfg.buffer = AGX_SCRATCH_PAGE_ADDRESS;
}
}

View file

@ -297,7 +297,7 @@ hk_upload_null_descriptors(struct hk_device *dev)
uint32_t offset_tex, offset_pbe;
agx_set_null_texture(&null_tex);
agx_set_null_pbe(&null_pbe, dev->rodata.null_sink);
agx_set_null_pbe(&null_pbe);
hk_descriptor_table_add(dev, &dev->images, &null_tex, sizeof(null_tex),
&offset_tex);

View file

@ -2767,7 +2767,7 @@ agx_upload_textures(struct agx_batch *batch, struct agx_compiled_shader *cs,
if (!(ctx->stage[stage].image_mask & BITFIELD_BIT(i))) {
agx_set_null_texture(texture);
agx_set_null_pbe(pbe, agx_pool_alloc_aligned(&batch->pool, 1, 64).gpu);
agx_set_null_pbe(pbe);
continue;
}