Mesa (master): i965/gen7: Fix miptree layout for cube surfaces.
Kenneth Graunke
kwg at kemper.freedesktop.org
Sun May 22 22:05:30 UTC 2011
Module: Mesa
Branch: master
Commit: d0c6d24a9ebe31b3a805e8f5845fc7e6fa552a98
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0c6d24a9ebe31b3a805e8f5845fc7e6fa552a98
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Sat May 21 22:51:42 2011 -0700
i965/gen7: Fix miptree layout for cube surfaces.
Volume 1a section 8.20.4.7.3 gives new equations which multiply by 12
instead of 11.
Fixes 8 piglit tests:
- fbo-cubemap
- texCube
- glsl-fs-texturecube
- glsl-fs-texturecube-2
- glsl-fs-texturecube-2-bias
- glsl-fs-texturecube-bias
- arb_seamless_cubemap
- cubemap
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/drivers/dri/i965/brw_tex_layout.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c
index 92e5d0f..4a3a2bf 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -61,7 +61,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
*/
h0 = ALIGN(mt->height0, align_h);
h1 = ALIGN(minify(h0), align_h);
- qpitch = (h0 + h1 + 11 * align_h);
+ qpitch = (h0 + h1 + (intel->gen >= 7 ? 12 : 11) * align_h);
if (mt->compressed)
qpitch /= 4;
More information about the mesa-commit
mailing list