r300g: final fix for r3xx constant buffer emission
authorMarek Olšák <maraeo@gmail.com>
Sat, 17 Jul 2010 13:35:03 +0000 (15:35 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sat, 17 Jul 2010 15:18:59 +0000 (17:18 +0200)
src/gallium/drivers/r300/r300_emit.c

index 167e3c09ca8c68a089292937f62cb9d6b23b0219..36a26a78717a37e5ca0651082c3a1234ea667f93 100644 (file)
@@ -181,7 +181,7 @@ void r300_emit_fs_constants(struct r300_context* r300, unsigned size, void *stat
     OUT_CS_REG_SEQ(R300_PFS_PARAM_0_X, count * 4);
     for (i = 0; i < count; i++)
         for (j = 0; j < 4; j++)
-            OUT_CS(pack_float24(buf->ptr[i*4+j]));
+            OUT_CS(pack_float24(*(float*)&buf->ptr[i*4+j]));
     END_CS;
 }