summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-03-06 13:57:04 -0800
committerEric Anholt <eric@anholt.net>2007-03-06 13:57:31 -0800
commit94c37f35872487c04136fb659526bffefd9c46ad (patch)
tree640598d1fb3586c95fcffc3ff8a34bf4c7d3cee9
parent30bb719ca0abc2599ffb89e59f297fa9a0a00c3c (diff)
Make the depth buffer X tiled instead of Y, and fix a Y tiling nit on 945.
The previous code claimed to set the depth buffer up as Y tiled, but due to lack of implementation in SetFence, it ended up being X tiled. Actually setting the Y tiling flag in the new version broke the depth buffer, so just switch the depth buffer to X tiling, which appears to work fine.
-rw-r--r--src/i830_memory.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index ea6b90d7..f0b50aac 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -1121,8 +1121,8 @@ i830_allocate_depthbuffer(ScrnInfoPtr pScrn)
pI830->depth_buffer =
i830_allocate_memory_tiled(pScrn, "depth buffer", size, pitch,
GTT_PAGE_SIZE, ALIGN_BOTH_ENDS,
- TILING_YMAJOR);
- pI830->depth_tiled = FENCE_YMAJOR;
+ TILING_XMAJOR);
+ pI830->depth_tiled = FENCE_XMAJOR;
}
/* Otherwise, allocate it linear. */
@@ -1369,7 +1369,9 @@ i830_set_fence(ScrnInfoPtr pScrn, int nr, unsigned int offset,
}
}
- if (IS_I9XX(pI830))
+ if ((IS_I945G(pI830) || IS_I945GM(pI830)) && tile_format == TILING_YMAJOR)
+ fence_pitch = pitch / 128;
+ else if (IS_I9XX(pI830))
fence_pitch = pitch / 512;
else
fence_pitch = pitch / 128;