summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2011-01-21 15:59:32 -0500
committerAlex Deucher <alexdeucher@gmail.com>2011-01-21 15:59:32 -0500
commit4817fac5f728b777939e2e2bee16b842c9e1367b (patch)
treefc6cd2d26d01d56d3a7ae87c33a2524624c8a485 /src
parent0a03f03a65aad925ba2d9c76b1d3356184607bf9 (diff)
vbo: remove useless radeon_vb_discard()
We already reset vb_start_op to -1 in the UMS/KMS ib discard functions.
Diffstat (limited to 'src')
-rw-r--r--src/evergreen_accel.c2
-rw-r--r--src/evergreen_exa.c4
-rw-r--r--src/r600_exa.c4
-rw-r--r--src/r6xx_accel.c4
-rw-r--r--src/radeon_exa_shared.c5
-rw-r--r--src/radeon_exa_shared.h1
6 files changed, 3 insertions, 17 deletions
diff --git a/src/evergreen_accel.c b/src/evergreen_accel.c
index b46e61de..4f5a120c 100644
--- a/src/evergreen_accel.c
+++ b/src/evergreen_accel.c
@@ -1162,8 +1162,6 @@ void evergreen_finish_op(ScrnInfoPtr pScrn, int vtx_size)
if (accel_state->vbo.vb_offset == accel_state->vbo.vb_start_op) {
radeon_ib_discard(pScrn);
radeon_cs_flush_indirect(pScrn);
- radeon_vb_discard(pScrn, &accel_state->vbo);
- radeon_vb_discard(pScrn, &accel_state->cbuf);
return;
}
diff --git a/src/evergreen_exa.c b/src/evergreen_exa.c
index 0fe00d80..bb685776 100644
--- a/src/evergreen_exa.c
+++ b/src/evergreen_exa.c
@@ -1291,8 +1291,6 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
if (!EVERGREENTextureSetup(pSrcPicture, pSrc, 0)) {
radeon_ib_discard(pScrn);
radeon_cs_flush_indirect(pScrn);
- radeon_vb_discard(pScrn, &accel_state->vbo);
- radeon_vb_discard(pScrn, &accel_state->cbuf);
return FALSE;
}
@@ -1300,8 +1298,6 @@ static Bool EVERGREENPrepareComposite(int op, PicturePtr pSrcPicture,
if (!EVERGREENTextureSetup(pMaskPicture, pMask, 1)) {
radeon_ib_discard(pScrn);
radeon_cs_flush_indirect(pScrn);
- radeon_vb_discard(pScrn, &accel_state->vbo);
- radeon_vb_discard(pScrn, &accel_state->cbuf);
return FALSE;
}
} else
diff --git a/src/r600_exa.c b/src/r600_exa.c
index 5dfc770e..f652ab68 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -1334,14 +1334,12 @@ static Bool R600PrepareComposite(int op, PicturePtr pSrcPicture,
if (!R600TextureSetup(pSrcPicture, pSrc, 0)) {
R600IBDiscard(pScrn, accel_state->ib);
- radeon_vb_discard(pScrn, &accel_state->vbo);
return FALSE;
}
if (pMask) {
if (!R600TextureSetup(pMaskPicture, pMask, 1)) {
R600IBDiscard(pScrn, accel_state->ib);
- radeon_vb_discard(pScrn, &accel_state->vbo);
return FALSE;
}
} else
@@ -1644,7 +1642,6 @@ R600CopyToVRAM(ScrnInfoPtr pScrn,
}
R600IBDiscard(pScrn, scratch);
- radeon_vb_discard(pScrn, &accel_state->vbo);
return TRUE;
}
@@ -1758,7 +1755,6 @@ R600DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
}
R600IBDiscard(pScrn, scratch);
- radeon_vb_discard(pScrn, &accel_state->vbo);
return TRUE;
diff --git a/src/r6xx_accel.c b/src/r6xx_accel.c
index e4365141..0c7714a9 100644
--- a/src/r6xx_accel.c
+++ b/src/r6xx_accel.c
@@ -71,6 +71,9 @@ void R600CPFlushIndirect(ScrnInfoPtr pScrn, drmBufPtr ib)
END_BATCH();
}
+ info->accel_state->vbo.vb_offset = 0;
+ info->accel_state->vbo.vb_start_op = -1;
+
//ErrorF("buffer bytes: %d\n", buffer->used);
indirect.idx = buffer->idx;
@@ -1173,7 +1176,6 @@ void r600_finish_op(ScrnInfoPtr pScrn, int vtx_size)
if (accel_state->vbo.vb_offset == accel_state->vbo.vb_start_op) {
R600IBDiscard(pScrn, accel_state->ib);
- radeon_vb_discard(pScrn, &accel_state->vbo);
return;
}
diff --git a/src/radeon_exa_shared.c b/src/radeon_exa_shared.c
index 2ef07511..be1d2faf 100644
--- a/src/radeon_exa_shared.c
+++ b/src/radeon_exa_shared.c
@@ -141,11 +141,6 @@ static Bool radeon_vb_get(ScrnInfoPtr pScrn)
return TRUE;
}
-void radeon_vb_discard(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo)
-{
- vbo->vb_start_op = -1;
-}
-
int radeon_cp_start(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
diff --git a/src/radeon_exa_shared.h b/src/radeon_exa_shared.h
index 489e3b0e..7b8b5cae 100644
--- a/src/radeon_exa_shared.h
+++ b/src/radeon_exa_shared.h
@@ -72,7 +72,6 @@ static inline void radeon_add_pixmap(struct radeon_cs *cs, PixmapPtr pPix, int r
extern void radeon_ib_discard(ScrnInfoPtr pScrn);
#endif /* XF86DRM_MODE */
-extern void radeon_vb_discard(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo);
extern int radeon_cp_start(ScrnInfoPtr pScrn);
extern void radeon_vb_no_space(ScrnInfoPtr pScrn, struct radeon_vbo_object *vbo, int vert_size);
extern void radeon_vbo_done_composite(PixmapPtr pDst);