summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-08-16 10:12:16 -0500
committerJason Ekstrand <[email protected]>2018-08-29 14:04:02 -0500
commitb1c414ef2834cfe5f764f5af0ff2ad09d4584351 (patch)
treea26adc027ea0cc662b9d78291c35a90c356c1809 /src/intel
parent37f7983bcca1afd4d570bc654b927a92308d1c68 (diff)
isl: Use the view array length for the image size
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/isl/isl_storage_image.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c
index e2bd4ddebad..43398e8a020 100644
--- a/src/intel/isl/isl_storage_image.c
+++ b/src/intel/isl/isl_storage_image.c
@@ -228,13 +228,16 @@ isl_surf_fill_image_param(const struct isl_device *dev,
{
*param = image_param_defaults;
+ if (surf->dim != ISL_SURF_DIM_3D) {
+ assert(view->base_array_layer + view->array_len <=
+ surf->logical_level0_px.array_len);
+ }
param->size[0] = isl_minify(surf->logical_level0_px.w, view->base_level);
param->size[1] = isl_minify(surf->logical_level0_px.h, view->base_level);
if (surf->dim == ISL_SURF_DIM_3D) {
param->size[2] = isl_minify(surf->logical_level0_px.d, view->base_level);
} else {
- param->size[2] = surf->logical_level0_px.array_len -
- view->base_array_layer;
+ param->size[2] = view->array_len;
}
isl_surf_get_image_offset_el(surf, view->base_level,