Mesa (master): glsl: Don't mark assignment temporaries as read-only
Ian Romanick
idr at kemper.freedesktop.org
Fri Jan 6 22:33:47 UTC 2012
Module: Mesa
Branch: master
Commit: 1f125374e73d1718cd54c946826c76b09998c055
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f125374e73d1718cd54c946826c76b09998c055
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Fri Dec 23 10:59:38 2011 -0800
glsl: Don't mark assignment temporaries as read-only
The various l-value errors this was designed to catch are now caught
by other means. Marking the temporaries as read-only now just
prevents sensible error messages from being generated. It's
0:0(0): error: function parameter 'out p' references the read-only variable '_post_incdec_tmp'
versus
0:13(5): error: function parameter 'out p' references a post-decrement operation
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
---
src/glsl/ast_to_hir.cpp | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
index cb2ef42..1aebca4 100644
--- a/src/glsl/ast_to_hir.cpp
+++ b/src/glsl/ast_to_hir.cpp
@@ -775,11 +775,6 @@ get_lvalue_copy(exec_list *instructions, ir_rvalue *lvalue)
instructions->push_tail(new(ctx) ir_assignment(new(ctx) ir_dereference_variable(var),
lvalue, NULL));
- /* Once we've created this temporary, mark it read only so it's no
- * longer considered an lvalue.
- */
- var->read_only = true;
-
return new(ctx) ir_dereference_variable(var);
}
More information about the mesa-commit
mailing list