summaryrefslogtreecommitdiff
path: root/src/r6xx_accel.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-11-25 10:33:17 +1000
committerDave Airlie <airlied@redhat.com>2009-11-25 10:35:37 +1000
commit3a460a14b9603159f10d89da27b559c36a184e27 (patch)
treecc53eaab10c9bf5f532bd77e9ac5650bb3f0422c /src/r6xx_accel.c
parent797a3f0c71c94477eec565ea2c95553c6f66d9fd (diff)
r600: refactor code to help future acceleration speedups.
This changes the vertex buffer index to be an offset, and records the start of the vb for each operation and uses that to set the operations up. This still flushes after each operation to make sure we have no regressions in non-kms/kms cases. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/r6xx_accel.c')
-rw-r--r--src/r6xx_accel.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index a89bfb3f..50afaed6 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -86,6 +86,8 @@ void R600IBDiscard(ScrnInfoPtr pScrn, drmBufPtr ib)
if (info->accel_state->vb_ptr) {
radeon_bo_unmap(info->accel_state->vb_bo);
info->accel_state->vb_ptr = NULL;
+ info->accel_state->vb_offset = 0;
+ info->accel_state->vb_start_op = 0;
}
if (CS_FULL(info->cs)) {
radeon_cs_flush_indirect(pScrn);
@@ -1183,8 +1185,8 @@ r600_vb_get(ScrnInfoPtr pScrn)
accel_state->vb_total = (accel_state->ib->total / 2);
accel_state->vb_ptr = (pointer)((char*)accel_state->ib->address +
(accel_state->ib->total / 2));
+ accel_state->vb_offset = 0;
}
- accel_state->vb_index = 0;
return TRUE;
}