diff options
author | Topi Pohjolainen <[email protected]> | 2017-07-18 08:53:16 +0300 |
---|---|---|
committer | Topi Pohjolainen <[email protected]> | 2017-07-18 21:35:44 +0300 |
commit | 4733891e51dc31ca12671abd531a00263d3053e2 (patch) | |
tree | e51ce2199bad812589747b5f857d045f757a4684 /src/intel | |
parent | 2309363868aaf5821b748042e34b5c827e6cfb00 (diff) |
intel/isl: Take 3D surfaces into account in image params
Reviewed-by: Jason Ekstrand <[email protected]>
Signed-off-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/isl/isl_storage_image.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intel/isl/isl_storage_image.c b/src/intel/isl/isl_storage_image.c index 4c56e787b51..a8aebce6d49 100644 --- a/src/intel/isl/isl_storage_image.c +++ b/src/intel/isl/isl_storage_image.c @@ -226,8 +226,12 @@ isl_surf_fill_image_param(const struct isl_device *dev, view->base_array_layer; } - isl_surf_get_image_offset_el(surf, view->base_level, view->base_array_layer, - 0, ¶m->offset[0], ¶m->offset[1]); + isl_surf_get_image_offset_el(surf, view->base_level, + surf->dim == ISL_SURF_DIM_3D ? + 0 : view->base_array_layer, + surf->dim == ISL_SURF_DIM_3D ? + view->base_array_layer : 0, + ¶m->offset[0], ¶m->offset[1]); const int cpp = isl_format_get_layout(surf->format)->bpb / 8; param->stride[0] = cpp; |