From: Kenneth Graunke Date: Sat, 11 Jan 2014 00:13:54 +0000 (-0800) Subject: glsl: Statically cast parameter exec_node to ir_variable. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=02ff2a275892aa180c84fa2fbb5b44409218c0f3;p=mesa.git glsl: Statically cast parameter exec_node to ir_variable. Formal function parameters are always ir_variable objects, not an arbitrary ir_instruction. So there's no need to dynamically cast here. Signed-off-by: Kenneth Graunke Reviewed-by: Matt Turner Reviewed-by: Ian Romanick --- diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 5b8463a8942..662ff4cea3f 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -2399,7 +2399,7 @@ builtin_builder::call(ir_function *f, ir_variable *ret, exec_list params) exec_list actual_params; foreach_list(node, ¶ms) { - ir_variable *var = ((ir_instruction *) node)->as_variable(); + ir_variable *var = (ir_variable *) node; actual_params.push_tail(var_ref(var)); }