On Mon, Apr 30, 2012 at 11:45:50AM -0700, Eric Anholt wrote: > I'm concerned that this will turn things that shouldn't be constant > expressions in GLSL (some user-defined function just using its > (constant) arguments and constants) and treating them as constant > expressions. Do we have tests for that?
The if (!this->is_builtin) return NULL has not been touched. > Our variables don't generally have unique names. It looks like from > your usage, that you could use pointer_hash/compare and get cheaper > searches plus unique references to variables. Done that, very nice. Avoids scoping problems with if blocks, which is a nice bonus. > > > + const exec_node *parameter_info = parameters.head; > > > > - /* Check if all parameters are constant */ > > - ir_constant *op[3]; > > foreach_list(n, actual_parameters) { > > - ir_constant *constant = ((ir_rvalue *) > > n)->constant_expression_value(); > > + ir_constant *constant = ((ir_rvalue *) > > n)->constant_expression_value(NULL); > > if (constant == NULL) > > return NULL; > > Why drop the "check if all parameters are constant" code? The if (constant == NULL) return NULL; is the check, and it is still there. Only the comment has morphed into "Check constness along the way." in a higher-level comment block. OG. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev