From: Topi Pohjolainen Date: Thu, 22 Jun 2017 18:20:51 +0000 (+0300) Subject: i965/wm: Prepare image surfaces for isl based X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7e5c8e593bdcec4b698d710740ddc5c8dd94f8dc;p=mesa.git i965/wm: Prepare image surfaces for isl based Reviewed-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Signed-off-by: Topi Pohjolainen --- diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index bc069491161..a8c40d54d82 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -1639,6 +1639,12 @@ get_image_num_layers(const struct intel_mipmap_tree *mt, GLenum target, if (target == GL_TEXTURE_CUBE_MAP) return 6; + if (mt->surf.size > 0) { + return target == GL_TEXTURE_3D ? + minify(mt->surf.logical_level0_px.depth, level) : + mt->surf.logical_level0_px.array_len; + } + return target == GL_TEXTURE_3D ? minify(mt->logical_depth0, level) : mt->logical_depth0; }