From 335543699a20387987613ac58e83c5a4328cc4b9 Mon Sep 17 00:00:00 2001 From: Topi Pohjolainen Date: Thu, 15 Jun 2017 17:37:34 +0300 Subject: [PATCH] i965/gen6: Declare minify(depth, level) layers for 3D stencil Keeps following patch refactoring the table allocation non-functional. Suggested-by: Nanley Chery Reviewed-by: Jason Ekstrand Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_tex_layout.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_tex_layout.c b/src/mesa/drivers/dri/i965/brw_tex_layout.c index 1f0a1e9..fd774f4 100644 --- a/src/mesa/drivers/dri/i965/brw_tex_layout.c +++ b/src/mesa/drivers/dri/i965/brw_tex_layout.c @@ -272,7 +272,9 @@ brw_miptree_layout_gen6_hiz_stencil(struct intel_mipmap_tree *mt) mt->total_height = 0; for (unsigned level = mt->first_level; level <= mt->last_level; level++) { - intel_miptree_set_level_info(mt, level, x, y, depth); + intel_miptree_set_level_info( + mt, level, x, y, + mt->target == GL_TEXTURE_3D ? minify(depth, level) : depth); const unsigned img_width = ALIGN(DIV_ROUND_UP(width, bw), mt->halign); const unsigned img_height = -- 2.7.4