Mesa (staging/22.1): nir/types: fix glsl_matrix_type_is_row_major() assert

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 30 16:54:31 UTC 2022


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

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Fri Jun 24 11:15:50 2022 -0400

nir/types: fix glsl_matrix_type_is_row_major() assert

interface blocks can have row_major set

cc: mesa-stable

affects (zink):
dEQP-GLES2.functional.shaders*

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>

Reviewed-by: Jason Ekstrand <jason.ekstrand at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17238>
(cherry picked from commit 0e7863c3b025042d7e41b5c9f73a6b7f788a87a3)

---

 .pick_status.json          | 2 +-
 src/compiler/nir_types.cpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index cb49dbb1285..3b4dd144bbf 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -58,7 +58,7 @@
         "description": "nir/types: fix glsl_matrix_type_is_row_major() assert",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": null
     },
diff --git a/src/compiler/nir_types.cpp b/src/compiler/nir_types.cpp
index 9d471480bbe..3fff85be703 100644
--- a/src/compiler/nir_types.cpp
+++ b/src/compiler/nir_types.cpp
@@ -313,7 +313,7 @@ glsl_type_is_matrix(const struct glsl_type *type)
 bool
 glsl_matrix_type_is_row_major(const struct glsl_type *type)
 {
-   assert(type->is_matrix() && type->explicit_stride);
+   assert((type->is_matrix() && type->explicit_stride) || type->is_interface());
    return type->interface_row_major;
 }
 



More information about the mesa-commit mailing list