asahi: fix imageSize of null image

Fixes faulting in imageAtomicAdd/unbound image test.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26614>
This commit is contained in:
Alyssa Rosenzweig 2023-11-20 10:35:03 -04:00
parent 0cd032e4bb
commit b13e3adb04

View file

@ -13,6 +13,13 @@ libagx_txs(constant struct agx_texture_packed *ptr, uint16_t lod,
{
agx_unpack(NULL, ptr, TEXTURE, d);
/* From the Vulkan spec:
*
* OpImageQuery*... return 0 if the bound descriptor is a null descriptor
*/
if (d.null)
return 0;
/* Buffer textures are lowered to 2D so the original size is irrecoverable.
* Instead, we stash it in the software-defined section.
*/