From 7e5c8e593bdcec4b698d710740ddc5c8dd94f8dc Mon Sep 17 00:00:00 2001 From: Topi Pohjolainen Date: Thu, 22 Jun 2017 21:20:51 +0300 Subject: i965/wm: Prepare image surfaces for isl based Reviewed-by: Jason Ekstrand Reviewed-by: Kenneth Graunke Signed-off-by: Topi Pohjolainen --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; } -- cgit v1.2.3