summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2009-07-06 15:29:53 +1000
committerDave Airlie <airlied@redhat.com>2009-07-06 15:29:53 +1000
commit98824f37fc74dc1fec2677515d0dc3cfc263f00a (patch)
tree322daa631e0e6f9cf327f105590d51036383939c
parent503b51343267248b4c6994b88238dd5384528f03 (diff)
radeon: move state changes into flush function
-rw-r--r--src/radeon_kms.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 4ff1c6af..59a654f7 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -73,12 +73,17 @@ const OptionInfoRec RADEONOptions_KMS[] = {
void radeon_cs_flush_indirect(ScrnInfoPtr pScrn)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
+ int ret;
if (!info->cs->cdw)
return;
radeon_cs_emit(info->cs);
radeon_cs_erase(info->cs);
+ ret = radeon_cs_space_check(info->cs);
+ if (ret)
+ ErrorF("space check failed in flush\n");
+
if (info->reemit_current2d)
info->reemit_current2d(pScrn, 0);
if (info->dri2.enabled) {
@@ -92,14 +97,10 @@ void radeon_ddx_cs_start(ScrnInfoPtr pScrn,
const char *func, int line)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
- int ret;
if (info->cs->cdw + n > info->cs->ndw) {
radeon_cs_flush_indirect(pScrn);
- ret = radeon_cs_space_check(info->cs);
- if (ret)
- ErrorF("space check failed in DDX CS start %s:%s:%d\n",
- file, func, line);
+
}
radeon_cs_begin(info->cs, n, file, func, line);
}