Mesa (main): glsl: Remove the ability to read text IR with conditional assignments
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Feb 11 17:59:12 UTC 2022
Module: Mesa
Branch: main
Commit: 50a0d0d875e58bea606de08a68b475e82e9a14c4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50a0d0d875e58bea606de08a68b475e82e9a14c4
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Fri Jan 14 17:55:21 2022 -0800
glsl: Remove the ability to read text IR with conditional assignments
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14573>
---
src/compiler/glsl/ir_reader.cpp | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/compiler/glsl/ir_reader.cpp b/src/compiler/glsl/ir_reader.cpp
index 31ded355d0b..7910804b475 100644
--- a/src/compiler/glsl/ir_reader.cpp
+++ b/src/compiler/glsl/ir_reader.cpp
@@ -585,18 +585,18 @@ ir_reader::read_assignment(s_expression *expr)
s_pattern pat4[] = { "assign", mask_list, lhs_expr, rhs_expr };
s_pattern pat5[] = { "assign", cond_expr, mask_list, lhs_expr, rhs_expr };
if (!MATCH(expr, pat4) && !MATCH(expr, pat5)) {
- ir_read_error(expr, "expected (assign [<condition>] (<write mask>) "
- "<lhs> <rhs>)");
+ ir_read_error(expr, "expected (assign (<write mask>) <lhs> <rhs>)");
return NULL;
}
- ir_rvalue *condition = NULL;
if (cond_expr != NULL) {
- condition = read_rvalue(cond_expr);
- if (condition == NULL) {
- ir_read_error(NULL, "when reading condition of assignment");
- return NULL;
- }
+ ir_rvalue *condition = read_rvalue(cond_expr);
+ if (condition == NULL)
+ ir_read_error(NULL, "when reading condition of assignment");
+ else
+ ir_read_error(expr, "conditional assignemnts are deprecated");
+
+ return NULL;
}
unsigned mask = 0;
@@ -643,7 +643,7 @@ ir_reader::read_assignment(s_expression *expr)
return NULL;
}
- return new(mem_ctx) ir_assignment(lhs, rhs, condition, mask);
+ return new(mem_ctx) ir_assignment(lhs, rhs, mask);
}
ir_call *
More information about the mesa-commit
mailing list