i965/wm: Prepare image surfaces for isl based

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
This commit is contained in:
Topi Pohjolainen 2017-06-22 21:20:51 +03:00
parent 59bf765c36
commit 7e5c8e593b

View file

@ -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;
}