glsl: Statically cast parameter exec_node to ir_variable.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 11 Jan 2014 00:13:54 +0000 (16:13 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Mon, 13 Jan 2014 19:38:19 +0000 (11:38 -0800)
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 <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/builtin_functions.cpp

index 5b8463a8942415cf9c247673c717f9ef1f710eeb..662ff4cea3f2d1ce19967965899a0f3186e95729 100644 (file)
@@ -2399,7 +2399,7 @@ builtin_builder::call(ir_function *f, ir_variable *ret, exec_list params)
    exec_list actual_params;
 
    foreach_list(node, &params) {
-      ir_variable *var = ((ir_instruction *) node)->as_variable();
+      ir_variable *var = (ir_variable *) node;
       actual_params.push_tail(var_ref(var));
    }