Mesa (master): i965/gen5+: Fix incorrect miptree layout for non-power-of-two cubemaps.
Kenneth Graunke
kwg at kemper.freedesktop.org
Tue Aug 2 06:57:40 UTC 2011
Module: Mesa
Branch: master
Commit: 81b036b4d79423c194596461b098a525af0102c2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=81b036b4d79423c194596461b098a525af0102c2
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Sat Jul 30 16:44:49 2011 -0700
i965/gen5+: Fix incorrect miptree layout for non-power-of-two cubemaps.
For power-of-two sizes, h0 == mt->height0 since it's already a multiple
of two. However, for NPOT, they're different; h1 should be computed
based on the original size.
Fixes piglit test "cubemap npot" and oglconform test "textureNPOT".
NOTE: This is a candidate for stable release branches.
Reviewed-by: Eric Anholt <eric at anholt.net>
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 f462f32..46a417a 100644
--- a/src/mesa/drivers/dri/i965/brw_tex_layout.c
+++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c
@@ -60,7 +60,7 @@ GLboolean brw_miptree_layout(struct intel_context *intel,
* given in Volume 1 of the BSpec.
*/
h0 = ALIGN(mt->height0, align_h);
- h1 = ALIGN(minify(h0), align_h);
+ h1 = ALIGN(minify(mt->height0), 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