Mesa (master): glsl: don't validate array types in ir_dereference_variable
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jul 8 23:46:09 UTC 2020
Module: Mesa
Branch: master
Commit: d2bd77eae4800e739ad360d4e06a7243d2335f84
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2bd77eae4800e739ad360d4e06a7243d2335f84
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Jul 8 18:37:34 2020 -0400
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 <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5813>
---
src/compiler/glsl/ir_validate.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
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");
More information about the mesa-commit
mailing list