summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl/ast_to_hir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/glsl/ast_to_hir.cpp b/src/compiler/glsl/ast_to_hir.cpp
index 3b00b69e3fd..1d776659568 100644
--- a/src/compiler/glsl/ast_to_hir.cpp
+++ b/src/compiler/glsl/ast_to_hir.cpp
@@ -1495,6 +1495,10 @@ ast_expression::do_hir(exec_list *instructions,
!state->check_version(120, 300, &loc,
"array comparisons forbidden")) {
error_emitted = true;
+ } else if ((op[0]->type->contains_subroutine() ||
+ op[1]->type->contains_subroutine())) {
+ _mesa_glsl_error(&loc, state, "subroutine comparisons forbidden");
+ error_emitted = true;
} else if ((op[0]->type->contains_opaque() ||
op[1]->type->contains_opaque())) {
_mesa_glsl_error(&loc, state, "opaque type comparisons forbidden");