i965/vs: Allow scalar values in assignments, too.
authorEric Anholt <eric@anholt.net>
Fri, 5 Aug 2011 23:31:30 +0000 (16:31 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 16 Aug 2011 20:04:41 +0000 (13:04 -0700)
Fixes glsl-vs-all-02 and many other tests.

src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

index c4a3c8a8667a4fa251eac6c23c6467732c3631dd..e3779ab04442458f9feaf8a8f9ec9ec15632b6b8 100644 (file)
@@ -1285,7 +1285,8 @@ vec4_visitor::visit(ir_assignment *ir)
    int first_enabled_chan = 0;
    int src_chan = 0;
 
-   assert(ir->lhs->type->is_vector());
+   assert(ir->lhs->type->is_vector() ||
+         ir->lhs->type->is_scalar());
    dst.writemask = ir->write_mask;
 
    for (int i = 0; i < 4; i++) {