Mesa (main): intel/nir: allow unknown format in lowering of storage images
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Oct 11 16:53:20 UTC 2021
Module: Mesa
Branch: main
Commit: fa251cf111dffd4a3e4d903623c24eb69575bf9a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa251cf111dffd4a3e4d903623c24eb69575bf9a
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Wed Jul 7 19:14:17 2021 +0300
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 <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13198>
---
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);
More information about the mesa-commit
mailing list