[Mesa-dev] [7.5/16] intel/isl: Take 3D surfaces into account in image params
Jason Ekstrand
jason at jlekstrand.net
Tue Jul 18 15:41:29 UTC 2017
I looked at Vulkan and I don't *think* this will break anything.
On Tue, Jul 18, 2017 at 12:23 AM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:
> CC: Jason Ekstrand <jason at jlekstrand.net>
> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
> src/intel/isl/isl_storage_image.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/isl/isl_storage_image.c
> b/src/intel/isl/isl_storage_image.c
> index 4c56e787b5..a8aebce6d4 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;
> --
> 2.11.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170718/e5f14345/attachment.html>
More information about the mesa-dev
mailing list