From 0388783a03e48b7efce984436a2b424c95761522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Briano?= Date: Wed, 17 Nov 2021 11:02:26 -0800 Subject: [PATCH] intel/nir: also allow unknown format for getting the size of a storage image Fixes: fa251cf111df ("intel/nir: allow unknown format in lowering of storage images") Reviewed-by: Jason Ekstrand Part-of: --- src/intel/compiler/brw_nir_lower_storage_image.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/intel/compiler/brw_nir_lower_storage_image.c b/src/intel/compiler/brw_nir_lower_storage_image.c index 57f553c4ac6..b0aabb5e64a 100644 --- a/src/intel/compiler/brw_nir_lower_storage_image.c +++ b/src/intel/compiler/brw_nir_lower_storage_image.c @@ -646,6 +646,9 @@ lower_image_size_instr(nir_builder *b, if (var->data.access & ACCESS_NON_READABLE) return false; + if (var->data.image.format == PIPE_FORMAT_NONE) + return false; + /* If we have a matching typed format, then we have an actual image surface * so we fall back and let the back-end emit a TXS for this. */