diff options
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_subset_vtx.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_subset_vtx.c b/src/mesa/drivers/dri/radeon/radeon_subset_vtx.c index abc984bc0f..1caaaec203 100644 --- a/src/mesa/drivers/dri/radeon/radeon_subset_vtx.c +++ b/src/mesa/drivers/dri/radeon/radeon_subset_vtx.c @@ -248,14 +248,18 @@ static GLuint copy_dma_verts( radeonContextPtr rmesa, return 2; } case GL_TRIANGLES: + ovf = nr % 3; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; + case GL_QUADS: + ovf = nr % 4; + for (i = 0 ; i < ovf ; i++) + copy_vertex( rmesa, nr-ovf+i, tmp[i] ); + return i; case GL_TRIANGLE_STRIP: case GL_QUAD_STRIP: - case GL_QUADS: - switch (nr) { - case 0: ovf = 0; break; - case 1: ovf = 1; break; - default: ovf = 2; break; - } + ovf = MIN2(nr, 2); for (i = 0 ; i < ovf ; i++) copy_vertex( rmesa, nr-ovf+i, tmp[i] ); return i; |