summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-03-15 12:08:04 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-03-15 12:08:04 -0400
commita55ced5ee20c07e743c7c0978803fd10589c1531 (patch)
tree8073c26004523a5bb41d79a8af297eb286aa4abd /src
parenta065eeb9b301ab452cc8fbd3cac1fd9a3841c4e1 (diff)
Fix fallout from r6xx/r7xx EXA merge in IB handling
Noticed Christiaan van Dijk. Should fix bug 20510
Diffstat (limited to 'src')
-rw-r--r--src/radeon_accel.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index dffbc576..a9a48480 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -688,8 +688,6 @@ void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard)
drmBufPtr buffer = info->cp->indirectBuffer;
int start = info->cp->indirectStart;
drm_radeon_indirect_t indirect;
- RING_LOCALS;
- RADEONCP_REFRESH(pScrn, info);
if (!buffer) return;
if (start == buffer->used && !discard) return;
@@ -700,10 +698,14 @@ void RADEONCPFlushIndirect(ScrnInfoPtr pScrn, int discard)
}
if (info->ChipFamily >= CHIP_FAMILY_R600) {
- while (buffer->used & 0x3c){
- BEGIN_RING(1);
- OUT_RING(CP_PACKET2()); /* fill up to multiple of 16 dwords */
- ADVANCE_RING();
+ if (buffer->used & 0x3c) {
+ RING_LOCALS;
+
+ while (buffer->used & 0x3c) {
+ BEGIN_RING(1);
+ OUT_RING(CP_PACKET2()); /* fill up to multiple of 16 dwords */
+ ADVANCE_RING();
+ }
}
}
@@ -735,12 +737,11 @@ void RADEONCPReleaseIndirect(ScrnInfoPtr pScrn)
drmBufPtr buffer = info->cp->indirectBuffer;
int start = info->cp->indirectStart;
drm_radeon_indirect_t indirect;
- RING_LOCALS;
- RADEONCP_REFRESH(pScrn, info);
-
if (info->ChipFamily >= CHIP_FAMILY_R600) {
- if (buffer) {
+ if (buffer && (buffer->used & 0x3c)) {
+ RING_LOCALS;
+
while (buffer->used & 0x3c) {
BEGIN_RING(1);
OUT_RING(CP_PACKET2()); /* fill up to multiple of 16 dwords */