Initial pass at resolving function calls
[mesa.git] / hir_field_selection.cpp
index 3c9fb08cb3e58d2dd363a93e6ff0fe86af9f2ce3..8bef094c60f6eb130d80d5eed5de089ad0ed20b4 100644 (file)
@@ -127,7 +127,7 @@ generate_swizzle(const char *str, struct ir_swizzle_mask *swiz,
 
 struct ir_instruction *
 _mesa_ast_field_selection_to_hir(const ast_expression *expr,
-                                simple_node *instructions,
+                                exec_list *instructions,
                                 struct _mesa_glsl_parse_state *state)
 {
    ir_instruction *op;
@@ -135,7 +135,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
    YYLTYPE loc;
 
 
-   op = _mesa_ast_to_hir(expr->subexpressions[0], instructions, state);
+   op = expr->subexpressions[0]->hir(instructions, state);
    deref = new ir_dereference(op);
 
    /* Initially assume that the resulting type of the field selection is an
@@ -156,7 +156,7 @@ _mesa_ast_field_selection_to_hir(const ast_expression *expr,
     * being applied.
     */
    loc = expr->get_location();
-   if (is_glsl_type_vector(op->type)) {
+   if (op->type->is_vector()) {
       if (generate_swizzle(expr->primary_expression.identifier, 
                           & deref->selector.swizzle,
                           op->type->vector_elements)) {