summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_render.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-05-26 19:36:21 +0200
committerMarek Olšák <[email protected]>2010-05-26 22:22:52 +0200
commit500160a3c9b0a777586c60abd3d136a5c30937f4 (patch)
treeb67a531a69c3f9bbf6cb70987cea64809abaa4c4 /src/gallium/drivers/r300/r300_render.c
parenta81730cb3205330b5fa1c5a80dc9f0c6dad6cb04 (diff)
r300g/swtcl: vbo transfer sanity checks
Diffstat (limited to 'src/gallium/drivers/r300/r300_render.c')
-rw-r--r--src/gallium/drivers/r300/r300_render.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c
index 3f66f75943e..1961e0e53a0 100644
--- a/src/gallium/drivers/r300/r300_render.c
+++ b/src/gallium/drivers/r300/r300_render.c
@@ -886,6 +886,8 @@ static void* r300_render_map_vertices(struct vbuf_render* render)
{
struct r300_render* r300render = r300_render(render);
+ assert(!r300render->vbo_transfer);
+
r300render->vbo_ptr = pipe_buffer_map(&r300render->r300->context,
r300render->vbo,
PIPE_TRANSFER_WRITE,
@@ -901,9 +903,13 @@ static void r300_render_unmap_vertices(struct vbuf_render* render,
struct r300_render* r300render = r300_render(render);
struct pipe_context* context = &r300render->r300->context;
+ assert(r300render->vbo_transfer);
+
r300render->vbo_max_used = MAX2(r300render->vbo_max_used,
r300render->vertex_size * (max + 1));
pipe_buffer_unmap(context, r300render->vbo, r300render->vbo_transfer);
+
+ r300render->vbo_transfer = NULL;
}
static void r300_render_release_vertices(struct vbuf_render* render)