r300-gallium: Fix masking on vertex formats.
authorCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 7 Mar 2009 03:07:13 +0000 (19:07 -0800)
committerCorbin Simpson <MostAwesomeDude@gmail.com>
Sat, 7 Mar 2009 03:07:54 +0000 (19:07 -0800)
Gah, what a simple yet terrible mistake.

src/gallium/drivers/r300/r300_state_derived.c

index 548a840f25d636ae5efe138828f71b43d12b52c9..b7fb36f6f98b983c4458966700c05b9efaa0fefe 100644 (file)
@@ -181,11 +181,11 @@ static void r300_update_vertex_layout(struct r300_context* r300)
             temp = translate_vertex_data_type(vinfo.attrib[i].emit) |
                 (tab[i] << R300_DST_VEC_LOC_SHIFT) | R300_SIGNED;
             if (i & 1) {
-                r300->vertex_info.vap_prog_stream_cntl[i >> 1] &= 0xffff0000;
+                r300->vertex_info.vap_prog_stream_cntl[i >> 1] &= 0xffff;
                 r300->vertex_info.vap_prog_stream_cntl[i >> 1] |=
                         temp << 16;
             } else {
-                r300->vertex_info.vap_prog_stream_cntl[i >> 1] &= 0xffff;
+                r300->vertex_info.vap_prog_stream_cntl[i >> 1] &= 0xffff0000;
                 r300->vertex_info.vap_prog_stream_cntl[i >> 1] |=
                     temp;
             }