summaryrefslogtreecommitdiff
path: root/src/i830_batchbuffer.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2009-05-21 13:12:52 -0700
committerCarl Worth <cworth@cworth.org>2009-05-26 16:12:17 -0700
commit8e942b70cb9a784b3f1311affd6fc74c4bcf68bb (patch)
treed2a5b8061ee5df751f75eca34a6e10b394f681e7 /src/i830_batchbuffer.h
parent1a039f4371bec455cad43f0fb7b329f2ee09a974 (diff)
Revert "Rely on BO pixmaps being present in acceleration paths."
This reverts commit 4653a7db622ad54a3182d93c81331765d930db34. Eric was getting a little too ambitious about our brave, new world. We do still want the driver to work with old, non-GEM kernels after all.
Diffstat (limited to 'src/i830_batchbuffer.h')
-rw-r--r--src/i830_batchbuffer.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/i830_batchbuffer.h b/src/i830_batchbuffer.h
index 02834381..4903b8c4 100644
--- a/src/i830_batchbuffer.h
+++ b/src/i830_batchbuffer.h
@@ -102,9 +102,16 @@ intel_batch_emit_reloc_pixmap(I830Ptr pI830, PixmapPtr pPixmap,
uint32_t delta)
{
dri_bo *bo = i830_get_pixmap_bo(pPixmap);
+ uint32_t offset;
assert(pI830->batch_ptr != NULL);
assert(intel_batch_space(pI830) >= 4);
- intel_batch_emit_reloc(pI830, bo, read_domains, write_domain, delta);
+ if (bo) {
+ intel_batch_emit_reloc(pI830, bo, read_domains, write_domain, delta);
+ return;
+ }
+ offset = intel_get_pixmap_offset(pPixmap);
+ *(uint32_t *)(pI830->batch_ptr + pI830->batch_used) = offset + delta;
+ pI830->batch_used += 4;
}
#define OUT_BATCH(dword) intel_batch_emit_dword(pI830, dword)