diff options
author | Alex Deucher <alexdeucher@gmail.com> | 2009-03-15 12:08:04 -0400 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2009-03-15 12:08:04 -0400 |
commit | a55ced5ee20c07e743c7c0978803fd10589c1531 (patch) | |
tree | 8073c26004523a5bb41d79a8af297eb286aa4abd /src/radeon_accel.c | |
parent | a065eeb9b301ab452cc8fbd3cac1fd9a3841c4e1 (diff) |
Fix fallout from r6xx/r7xx EXA merge in IB handling
Noticed Christiaan van Dijk.
Should fix bug 20510
Diffstat (limited to 'src/radeon_accel.c')
-rw-r--r-- | src/radeon_accel.c | 21 |
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 */ |