st/xorg: use quads instead of triangle fans
authorZack Rusin <zackr@vmware.com>
Fri, 6 Nov 2009 09:23:33 +0000 (04:23 -0500)
committerZack Rusin <zackr@vmware.com>
Sat, 7 Nov 2009 03:08:21 +0000 (22:08 -0500)
easier to split, accumulate and batch those

src/gallium/state_trackers/xorg/xorg_renderer.c

index c11f250e693f5ac733252f1f73ad2ba06191dba0..42fd7304a2d19dc4126a9741b01805ed76279387 100644 (file)
@@ -629,7 +629,7 @@ static void renderer_copy_texture(struct xorg_renderer *r,
 
    if (buf) {
       util_draw_vertex_buffer(r->pipe, buf, 0,
-                              PIPE_PRIM_TRIANGLE_FAN,
+                              PIPE_PRIM_QUADS,
                               4,  /* verts */
                               2); /* attribs/vert */
 
@@ -812,7 +812,7 @@ void renderer_draw_solid_rect(struct xorg_renderer *r,
 
    if (buf) {
       util_draw_vertex_buffer(pipe, buf, 0,
-                              PIPE_PRIM_TRIANGLE_FAN,
+                              PIPE_PRIM_QUADS,
                               4,  /* verts */
                               2); /* attribs/vert */
 
@@ -873,7 +873,7 @@ void renderer_draw_textures(struct xorg_renderer *r,
       num_attribs += num_textures;
 
       util_draw_vertex_buffer(pipe, buf, 0,
-                              PIPE_PRIM_TRIANGLE_FAN,
+                              PIPE_PRIM_QUADS,
                               4,  /* verts */
                               num_attribs); /* attribs/vert */
 
@@ -898,7 +898,7 @@ void renderer_draw_yuv(struct xorg_renderer *r,
       const int num_attribs = 2; /*pos + tex coord*/
 
       util_draw_vertex_buffer(pipe, buf, 0,
-                              PIPE_PRIM_TRIANGLE_FAN,
+                              PIPE_PRIM_QUADS,
                               4,  /* verts */
                               num_attribs); /* attribs/vert */