[Mesa-dev] [PATCH 12/22] i965: Prepare image setup from miptree for isl based

Jason Ekstrand jason at jlekstrand.net
Tue Jul 18 20:58:37 UTC 2017


9-12  Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Tue, Jul 18, 2017 at 1:46 AM, Topi Pohjolainen <
topi.pohjolainen at gmail.com> wrote:

> Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
> ---
>  src/mesa/drivers/dri/i965/intel_screen.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_screen.c
> b/src/mesa/drivers/dri/i965/intel_screen.c
> index 7a92ef601b..9c74d2aa54 100644
> --- a/src/mesa/drivers/dri/i965/intel_screen.c
> +++ b/src/mesa/drivers/dri/i965/intel_screen.c
> @@ -412,8 +412,15 @@ intel_setup_image_from_mipmap_tree(struct
> brw_context *brw, __DRIimage *image,
>
>     intel_miptree_check_level_layer(mt, level, zoffset);
>
> -   image->width = minify(mt->physical_width0, level - mt->first_level);
> -   image->height = minify(mt->physical_height0, level - mt->first_level);
> +   if (mt->surf.size > 0) {
> +      image->width = minify(mt->surf.phys_level0_sa.width,
> +                            level - mt->first_level);
> +      image->height = minify(mt->surf.phys_level0_sa.height,
> +                             level - mt->first_level);
> +   } else {
> +      image->width = minify(mt->physical_width0, level - mt->first_level);
> +      image->height = minify(mt->physical_height0, level -
> mt->first_level);
> +   }
>     image->pitch = mt->surf.row_pitch;
>
>     image->offset = intel_miptree_get_tile_offsets(mt, level, zoffset,
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170718/e427c8b9/attachment.html>


More information about the mesa-dev mailing list