r200: validate vertex buffer
authorJerome Glisse <glisse@freedesktop.org>
Sun, 12 Apr 2009 12:25:36 +0000 (14:25 +0200)
committerJerome Glisse <glisse@freedesktop.org>
Sun, 12 Apr 2009 12:25:36 +0000 (14:25 +0200)
src/mesa/drivers/dri/r200/r200_cmdbuf.c

index 3a11a448eca9b4eaa66092df1ae5fdea686a87a2..e34ea9655e07ce6aa69ee21743f21b02f1f5b9e8 100644 (file)
@@ -209,6 +209,11 @@ GLushort *r200AllocEltsOpenEnded( r200ContextPtr rmesa,
    rmesa->radeon.tcl.elt_dma_offset = 0;
    rmesa->tcl.elt_used = min_nr * 2;
 
+   radeon_validate_bo(&rmesa->radeon, rmesa->radeon.tcl.elt_dma_bo,
+                      RADEON_GEM_DOMAIN_GTT, 0);
+   if (radeon_revalidate_bos(rmesa->radeon.glCtx) == GL_FALSE)
+      fprintf(stderr,"failure to revalidate BOs - badness\n");
+
    radeon_bo_map(rmesa->radeon.tcl.elt_dma_bo, 1);
    retval = rmesa->radeon.tcl.elt_dma_bo->ptr + rmesa->radeon.tcl.elt_dma_offset;