Add a missing EnsureCmdBufSpace, matching r200.
authorEric Anholt <anholt@FreeBSD.org>
Sat, 28 May 2005 22:56:16 +0000 (22:56 +0000)
committerEric Anholt <anholt@FreeBSD.org>
Sat, 28 May 2005 22:56:16 +0000 (22:56 +0000)
src/mesa/drivers/dri/radeon/radeon_swtcl.c

index c71414ec5873ce3ef449bfdc594571c1745b8787..4f2198ac5b56c2b0d4af1a5dbe8bf940ee47023b 100644 (file)
@@ -382,6 +382,7 @@ static void flush_last_swtcl_prim( radeonContextPtr rmesa  )
       if (rmesa->dma.current.start != rmesa->dma.current.ptr) {
         radeonEnsureCmdBufSpace( rmesa, VERT_AOS_BUFSZ +
                                  rmesa->hw.max_state_size + VBUF_BUFSZ );
+
         radeonEmitVertexAOS( rmesa,
                              rmesa->swtcl.vertex_size,
                              current_offset);
@@ -543,6 +544,9 @@ static void *radeon_alloc_elts( radeonContextPtr rmesa, int nr )
         rmesa->dma.flush( rmesa );
       }
 
+      radeonEnsureCmdBufSpace( rmesa, VERT_AOS_BUFSZ +
+                              rmesa->hw.max_state_size + ELTS_BUFSZ(nr) );
+
       radeonEmitVertexAOS( rmesa,
                           rmesa->swtcl.vertex_size,
                           (rmesa->radeonScreen->gart_buffer_offset +