diff options
author | Topi Pohjolainen <[email protected]> | 2016-08-26 18:37:09 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2016-09-12 11:48:29 +0300 |
commit | 514afdce95e1c75a754412203425a8ac1282cd2d (patch) | |
tree | be9aa822f73c26922e5a0b88921f834fa5a6bd52 /src/intel/blorp/blorp.c | |
parent | e597821ef2292fff42488d44917f3480cceb56ad (diff) |
intel/blorp: Allow multiple layers
Signed-off-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/blorp/blorp.c')
-rw-r--r-- | src/intel/blorp/blorp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/intel/blorp/blorp.c b/src/intel/blorp/blorp.c index 4dbba017489..17c1ff4c134 100644 --- a/src/intel/blorp/blorp.c +++ b/src/intel/blorp/blorp.c @@ -119,6 +119,9 @@ brw_blorp_surface_info_init(struct blorp_context *blorp, }, }; + info->view.array_len = MAX2(info->surf.logical_level0_px.depth, + info->surf.logical_level0_px.array_len); + if (!is_render_target && (info->surf.dim == ISL_SURF_DIM_3D || info->surf.msaa_layout == ISL_MSAA_LAYOUT_ARRAY)) { @@ -128,12 +131,12 @@ brw_blorp_surface_info_init(struct blorp_context *blorp, * guaranteed that we won't be doing any funny surface hacks. */ info->view.base_array_layer = 0; - info->view.array_len = MAX2(info->surf.logical_level0_px.depth, - info->surf.logical_level0_px.array_len); info->z_offset = layer / layer_multiplier; } else { info->view.base_array_layer = layer / layer_multiplier; - info->view.array_len = 1; + + assert(info->view.array_len >= info->view.base_array_layer); + info->view.array_len -= info->view.base_array_layer; info->z_offset = 0; } } |