summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_clear.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2014-02-22 23:47:30 -0800
committerKenneth Graunke <kenneth@whitecape.org>2014-02-26 02:29:44 -0800
commitb18871c863fabec3ed383881d2cdd0298b157b06 (patch)
tree98d8ad841edd45dd69004941eedf9b4493502ad4 /src/mesa/drivers/dri/i965/brw_clear.c
parentac0a8b9540b29eb6faa55e4c77ba8fa99478884a (diff)
downloadexternal_mesa3d-b18871c863fabec3ed383881d2cdd0298b157b06.zip
external_mesa3d-b18871c863fabec3ed383881d2cdd0298b157b06.tar.gz
external_mesa3d-b18871c863fabec3ed383881d2cdd0298b157b06.tar.bz2
i965: Don't forget to subtract mt->first_level in minify calls.
This fixes fbo-clear-formats GL_ARB_depth_texture on Ironlake, which regressed since commit f128bcc7c293013f4b44e4b661638333de0077c2 ("i965: Drop mt->levels[].width/height.") intel_miptree_copy_slice was calling minify(.., 7) on a 2x2 texture with mt->first_level == 7. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75292 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_clear.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_clear.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_clear.c b/src/mesa/drivers/dri/i965/brw_clear.c
index b2cea98..6571e84 100644
--- a/src/mesa/drivers/dri/i965/brw_clear.c
+++ b/src/mesa/drivers/dri/i965/brw_clear.c
@@ -155,8 +155,9 @@ brw_fast_clear_depth(struct gl_context *ctx)
* width of the map (LOD0) is not multiple of 16, fast clear
* optimization must be disabled.
*/
- if (brw->gen == 6 && (minify(mt->physical_width0,
- depth_irb->mt_level) % 16) != 0)
+ if (brw->gen == 6 &&
+ (minify(mt->physical_width0,
+ depth_irb->mt_level - mt->first_level) % 16) != 0)
return false;
/* FALLTHROUGH */