summaryrefslogtreecommitdiff
path: root/src/r6xx_accel.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-09-08 11:25:39 +1000
committerDave Airlie <airlied@redhat.com>2009-09-08 11:25:39 +1000
commit853f4c3d1ea8f975ab2855f18d3ae336a4095091 (patch)
treebf6b3d4556ff284ec3f7d6e1cf646003ea9ea355 /src/r6xx_accel.c
parent8f4196e88855f10762254fca9e0a0988e7b5562f (diff)
r600: more alignment fixups + vb map/unmap
I'm not so sure the vb map/unmap is a good idea, I think it pretty much locksteps the cpu/gpu, so we should really work out if we really need to flush this often, since mesa doesn't have to and we are just doing 3D ops.
Diffstat (limited to 'src/r6xx_accel.c')
-rw-r--r--src/r6xx_accel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index 6346e526..985595e7 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -50,8 +50,7 @@ void r600_cs_flush_indirect(ScrnInfoPtr pScrn)
if (info->accel_state->vb_bo) {
radeon_bo_unmap(info->accel_state->vb_bo);
- radeon_bo_ref(info->accel_state->vb_bo);
- info->accel_state->vb_bo = NULL;
+ info->accel_state->vb_ptr = NULL;
}
radeon_cs_emit(info->cs);
@@ -1161,15 +1160,17 @@ r600_vb_get(ScrnInfoPtr pScrn)
if (accel_state->vb_bo == NULL) {
accel_state->vb_mc_addr = 0;
accel_state->vb_bo = radeon_bo_open(info->bufmgr, 0, 16 * 1024,
- 4096, RADEON_GEM_DOMAIN_GTT, 0);
+ 0, RADEON_GEM_DOMAIN_GTT, 0);
if (accel_state->vb_bo == NULL)
return FALSE;
+ accel_state->vb_total = 16 * 1024;
+ }
+ if (!accel_state->vb_ptr) {
ret = radeon_bo_map(accel_state->vb_bo, 1);
if (ret) {
FatalError("failed to vb %d\n", ret);
return FALSE;
}
- accel_state->vb_total = 16 * 1024;
accel_state->vb_ptr = accel_state->vb_bo->ptr;
}
} else