summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-01-24 00:13:25 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-01-24 00:13:25 -0500
commit9b0e03e98ab739efb4031f81cc4a1a50b3d87a42 (patch)
tree88bf1b5d484ea51ffa6465d26133c6e3812658f9
parentfadee0409a8e13b78bbccb83dd70f590fee23d57 (diff)
vbo: avoid extra cs revalidation in vbo alloc
Make sure we have a valid bo before revalidating.
-rw-r--r--src/radeon_vbo.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/radeon_vbo.c b/src/radeon_vbo.c
index a72224f6..09970465 100644
--- a/src/radeon_vbo.c
+++ b/src/radeon_vbo.c
@@ -191,17 +191,17 @@ again_alloc:
insert_at_head(&accel_state->bo_reserved, dma_bo);
}
+ if (is_empty_list(&accel_state->bo_reserved))
+ goto again_alloc;
+
+ bo = first_elem(&accel_state->bo_reserved)->bo;
+
/* need a space check */
if (radeon_cs_space_check_with_bo(info->cs,
- first_elem(&accel_state->bo_reserved)->bo,
+ bo,
RADEON_GEM_DOMAIN_GTT, 0))
- fprintf(stderr,"failed to revalidated\n");
+ ErrorF("failed to revalidate\n");
- if (is_empty_list(&accel_state->bo_reserved)) {
- goto again_alloc;
- }
-
- bo = first_elem(&accel_state->bo_reserved)->bo;
return bo;
}