vert_copy_spec macro
authorPatrice Mandin <pmandin@freedesktop.org>
Fri, 8 Sep 2006 21:30:32 +0000 (21:30 +0000)
committerPatrice Mandin <pmandin@freedesktop.org>
Fri, 8 Sep 2006 21:30:32 +0000 (21:30 +0000)
src/mesa/drivers/dri/nouveau/nv10_swtcl.c

index 7f3d275c402d706e83834c0d422dc5ad01fc9cfd..75b35271f6359fe29a8a102b3a3b84ff4d94f585 100644 (file)
@@ -286,9 +286,11 @@ static struct {
 #define VERT_COPY_SPEC( v0, v1 )                       \
        do {                                                    \
                if (specoffset) {                                       \
-                       v0->f[specoffset][0] = v1->f[specoffset][0];    \
-                       v0->f[specoffset][1] = v1->f[specoffset][1];    \
-                       v0->f[specoffset][2] = v1->f[specoffset][2];    \
+                       nouveau_color_t *spec0 = (nouveau_color_t *)&((v0)->ui[specoffset]);    \
+                       nouveau_color_t *spec1 = (nouveau_color_t *)&((v1)->ui[specoffset]);    \
+                       spec0->red   = spec1->red;      \
+                       spec0->green = spec1->green;    \
+                       spec0->blue  = spec1->blue;     \
                }                                                       \
        } while (0)