From fa251cf111dffd4a3e4d903623c24eb69575bf9a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Wed, 7 Jul 2021 19:14:17 +0300 Subject: [PATCH] intel/nir: allow unknown format in lowering of storage images We're about to allow unknown format for specific formats in Anv. Signed-off-by: Lionel Landwerlin Reviewed-by: Jason Ekstrand Part-of: --- src/intel/compiler/brw_nir_lower_storage_image.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/intel/compiler/brw_nir_lower_storage_image.c b/src/intel/compiler/brw_nir_lower_storage_image.c index 31c029871c3..a9946694f3b 100644 --- a/src/intel/compiler/brw_nir_lower_storage_image.c +++ b/src/intel/compiler/brw_nir_lower_storage_image.c @@ -367,6 +367,10 @@ lower_image_load_instr(nir_builder *b, { nir_deref_instr *deref = nir_src_as_deref(intrin->src[0]); nir_variable *var = nir_deref_instr_get_variable(deref); + + if (var->data.image.format == PIPE_FORMAT_NONE) + return false; + const enum isl_format image_fmt = isl_format_for_pipe_format(var->data.image.format); @@ -526,6 +530,9 @@ lower_image_store_instr(nir_builder *b, if (var->data.access & ACCESS_NON_READABLE) return false; + if (var->data.image.format == PIPE_FORMAT_NONE) + return false; + const enum isl_format image_fmt = isl_format_for_pipe_format(var->data.image.format);