summaryrefslogtreecommitdiff
path: root/src/radeon_accel.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2010-04-16 20:40:56 -0400
committerAlex Deucher <alexdeucher@gmail.com>2010-04-16 20:40:56 -0400
commit57577d5cd0641b7cad02242478699bcfece59227 (patch)
tree102e881fc09ae78540b529c32e56987cee938000 /src/radeon_accel.c
parent31a888e78fa403f2bddacee098a29f36eaa969cb (diff)
r1xx texvid: deal with large numbers of verts
should fix fdo bug 25884
Diffstat (limited to 'src/radeon_accel.c')
-rw-r--r--src/radeon_accel.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/radeon_accel.c b/src/radeon_accel.c
index 0250d912..823f91d6 100644
--- a/src/radeon_accel.c
+++ b/src/radeon_accel.c
@@ -573,6 +573,18 @@ uint32_t radeonGetPixmapOffset(PixmapPtr pPix)
return offset;
}
+int radeon_cs_space_remaining(ScrnInfoPtr pScrn)
+{
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+
+#ifdef XF86DRM_MODE
+ if (info->cs)
+ return (info->cs->ndw - info->cs->cdw);
+ else
+#endif
+ return (info->cp->indirectBuffer->total - info->cp->indirectBuffer->used) / (int)sizeof(uint32_t);
+}
+
#define ACCEL_MMIO
#define ACCEL_PREAMBLE() unsigned char *RADEONMMIO = info->MMIO
#define BEGIN_ACCEL(n) RADEONWaitForFifo(pScrn, (n))