summaryrefslogtreecommitdiff
path: root/src/i830_batchbuffer.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-08-04 01:43:44 -0700
committerKeith Packard <keithp@keithp.com>2008-08-05 15:40:14 -0700
commit12df8f40d2fb41f5446db1b49beeb442da18bee2 (patch)
tree03c1b26bf3d7900e04a881406ae9497d370b248e /src/i830_batchbuffer.h
parent4cc20b7f6e25f4be4598f8edbe0077117126b4ee (diff)
Use dri_bo for all object allocations, including pixmaps under uxa
Diffstat (limited to 'src/i830_batchbuffer.h')
-rw-r--r--src/i830_batchbuffer.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h
index c9b84215..4c1198d6 100644
--- a/src/i830_batchbuffer.h
+++ b/src/i830_batchbuffer.h
@@ -74,12 +74,24 @@ intel_batch_emit_reloc (I830Ptr pI830,
}
static inline void
-intel_batch_emit_reloc_pixmap(I830Ptr pI830, PixmapPtr pPixmap, uint32_t delta)
+intel_batch_emit_reloc_pixmap(I830Ptr pI830, PixmapPtr pPixmap,
+ uint32_t read_domains, uint32_t write_domain,
+ uint32_t delta)
{
+#if I830_USE_UXA
+ dri_bo *bo = i830_uxa_get_pixmap_bo(pPixmap);
+#endif
+ uint32_t offset;
assert(pI830->batch_ptr != NULL);
assert(intel_batch_space(pI830) >= 4);
- *(uint32_t *)(pI830->batch_ptr + pI830->batch_used) =
- intel_get_pixmap_offset(pPixmap) + delta;
+#if I830_USE_UXA
+ if (bo) {
+ intel_batch_emit_reloc(pI830, bo, read_domains, write_domain, delta);
+ return;
+ }
+#endif
+ offset = intel_get_pixmap_offset(pPixmap);
+ *(uint32_t *)(pI830->batch_ptr + pI830->batch_used) = offset + delta;
pI830->batch_used += 4;
}
@@ -88,8 +100,8 @@ intel_batch_emit_reloc_pixmap(I830Ptr pI830, PixmapPtr pPixmap, uint32_t delta)
#define OUT_RELOC(bo, read_domains, write_domains, delta) \
intel_batch_emit_reloc (pI830, bo, read_domains, write_domains, delta)
-#define OUT_RELOC_PIXMAP(pPixmap, delta) \
- intel_batch_emit_reloc_pixmap(pI830, pPixmap, delta)
+#define OUT_RELOC_PIXMAP(pPixmap, reads, write, delta) \
+ intel_batch_emit_reloc_pixmap(pI830, pPixmap, reads, write, delta)
union intfloat {
float f;