summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTopi Pohjolainen <[email protected]>2017-06-22 21:20:51 +0300
committerTopi Pohjolainen <[email protected]>2017-07-20 11:32:21 +0300
commit7e5c8e593bdcec4b698d710740ddc5c8dd94f8dc (patch)
tree0bce0a230821fdbd7977ae22892e810eba395c8e /src
parent59bf765c363acccafd03cc7499046e593b88ab34 (diff)
i965/wm: Prepare image surfaces for isl based
Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_surface_state.c6
1 files changed, 6 insertions, 0 deletions
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;
}