summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2009-01-05 23:28:50 -0800
committerEric Anholt <eric@anholt.net>2009-01-06 11:20:07 -0800
commit9a5082d2920c1a212fe935b5a093013e8035c321 (patch)
tree955dcfd4528d1bfb3f1123689c0a5cda24440aa8
parent7736b65be4fb4d5c59d7aedb1e64da976bb10ae9 (diff)
Disable DRI2 buffer tiling on non-965, as those need fence regs for 2D blits.
This fixes glReadPixels failure on single-channel 915GM, as the software code for readpixels was actually the only code in the driver doing tiling against these buffers (everything else says "rely on fence registers", since the 2D blits don't have a "don't rely on fence registers" option).
-rw-r--r--src/i830_dri.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 0fe0eca7..c4440ce8 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -1883,6 +1883,15 @@ I830DRI2CreateBuffers(DrawablePtr pDraw, unsigned int *attachments, int count)
break;
}
+ /* Disable tiling on 915-class 3D for now. Because the 2D blitter
+ * requires fence regs to operate, and they're not being managed
+ * by the kernel yet, we don't want to expose tiled buffers to the
+ * 3D client as it'll just render incorrectly if it pays attention
+ * to our tiling bits at all.
+ */
+ if (!IS_I965G(pI830))
+ tiling = I915_TILING_NONE;
+
if (tiling != I915_TILING_NONE) {
bo = i830_get_pixmap_bo(pPixmap);
drm_intel_bo_set_tiling(bo, &tiling,