nir/types: fix glsl_matrix_type_is_row_major() assert
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Fri, 24 Jun 2022 15:15:50 +0000 (11:15 -0400)
committerMarge Bot <emma+marge@anholt.net>
Thu, 30 Jun 2022 00:41:46 +0000 (00:41 +0000)
interface blocks can have row_major set

cc: mesa-stable

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

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17238>

src/compiler/nir_types.cpp

index 4693ddd..1f86a38 100644 (file)
@@ -319,7 +319,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;
 }