Mesa (staging/21.3): intel/nir: also allow unknown format for getting the size of a storage image

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Nov 18 19:01:42 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: ba011bfe7dab3fc33ae97dec5abe8df704941e3b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ba011bfe7dab3fc33ae97dec5abe8df704941e3b

Author: Iván Briano <ivan.briano at intel.com>
Date:   Wed Nov 17 11:02:26 2021 -0800

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 <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13847>
(cherry picked from commit 0388783a03e48b7efce984436a2b424c95761522)

---

 .pick_status.json                                | 2 +-
 src/intel/compiler/brw_nir_lower_storage_image.c | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/.pick_status.json b/.pick_status.json
index 2176696e0eb..2bfea075c2f 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -265,7 +265,7 @@
         "description": "intel/nir: also allow unknown format for getting the size of a storage image",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "fa251cf111dffd4a3e4d903623c24eb69575bf9a"
     },
diff --git a/src/intel/compiler/brw_nir_lower_storage_image.c b/src/intel/compiler/brw_nir_lower_storage_image.c
index a9946694f3b..7bee8c7153e 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.
     */



More information about the mesa-commit mailing list