diff --git a/src/asahi/lib/shaders/texture.cl b/src/asahi/lib/shaders/texture.cl index cb768cc37f1..2d68b19ced2 100644 --- a/src/asahi/lib/shaders/texture.cl +++ b/src/asahi/lib/shaders/texture.cl @@ -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. */