aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-07-08 18:37:34 -0400
committerMarge Bot <[email protected]>2020-07-08 23:22:17 +0000
commitd2bd77eae4800e739ad360d4e06a7243d2335f84 (patch)
tree9f011e35036b2b0d6c4180773d864afeedd90b2a /src
parent9ad19fff3eb1873ad8283a42a39f2109ea5967c3 (diff)
glsl: don't validate array types in ir_dereference_variable
Fixes: 8d62969cfe8 - glsl: validate more stuff Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3245 Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5813>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/glsl/ir_validate.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/glsl/ir_validate.cpp b/src/compiler/glsl/ir_validate.cpp
index 426862c039c..c9d5ca1e356 100644
--- a/src/compiler/glsl/ir_validate.cpp
+++ b/src/compiler/glsl/ir_validate.cpp
@@ -98,7 +98,10 @@ ir_validate::visit(ir_dereference_variable *ir)
abort();
}
- if (ir->var->type != ir->type) {
+ /* Compare types without arrays, because one side can be sized and
+ * the other unsized.
+ */
+ if (ir->var->type->without_array() != ir->type->without_array()) {
printf("ir_dereference_variable type is not equal to variable type: ");
ir->print();
printf("\n");