mesa: Fix linker-assigned varying component counting since 8fb1e4a462
[mesa.git] / src / glsl / lower_vector.cpp
index ae501201004b30bebe06136dcc570a7bf5b2052c..0cd6909db55d5dc8a06716bb68a8c0667ee33f53 100644 (file)
@@ -125,7 +125,7 @@ lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
    if (this->dont_lower_swz && is_extended_swizzle(expr))
       return;
 
-   /* FINISHME: Is this the right thing to use for the talloc context?
+   /* FINISHME: Is this the right thing to use for the ralloc context?
     */
    void *const mem_ctx = expr;
 
@@ -169,7 +169,7 @@ lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
       case GLSL_TYPE_INT:   d.i[assigned] = c->value.i[0]; break;
       case GLSL_TYPE_FLOAT: d.f[assigned] = c->value.f[0]; break;
       case GLSL_TYPE_BOOL:  d.b[assigned] = c->value.b[0]; break;
-      defatul:              assert(!"Should not get here."); break;
+      default:              assert(!"Should not get here."); break;
       }
 
       write_mask |= (1U << i);
@@ -183,7 +183,7 @@ lower_vector_visitor::handle_rvalue(ir_rvalue **rvalue)
    if (assigned > 0) {
       ir_constant *const c =
         new(mem_ctx) ir_constant(glsl_type::get_instance(expr->type->base_type,
-                                                         assigned, 0),
+                                                         assigned, 1),
                                  &d);
       ir_dereference *const lhs = new(mem_ctx) ir_dereference_variable(temp);
       ir_assignment *const assign =