Module: Mesa Branch: main Commit: 50a0d0d875e58bea606de08a68b475e82e9a14c4 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50a0d0d875e58bea606de08a68b475e82e9a14c4
Author: Ian Romanick <[email protected]> Date: Fri Jan 14 17:55:21 2022 -0800 glsl: Remove the ability to read text IR with conditional assignments Reviewed-by: Matt Turner <[email protected]> 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 *
