[Mesa-dev] [PATCH 14/22] i965/miptree: Add support for imported bo offsets for isl based

Jason Ekstrand jason at jlekstrand.net
Tue Jul 18 21:00:29 UTC 2017


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_mipmap_tree.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> index 879036ce77..a0b129adb4 100644
> --- a/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> +++ b/src/mesa/drivers/dri/i965/intel_mipmap_tree.c
> @@ -1435,9 +1435,22 @@ intel_miptree_get_image_offset(const struct
> intel_mipmap_tree *mt,
>                                GLuint level, GLuint slice,
>                                GLuint *x, GLuint *y)
>  {
> +   if (level == 0 && slice == 0) {
> +      *x = mt->level[0].level_x;
> +      *y = mt->level[0].level_y;
> +      return;
> +   }
> +
>     if (mt->surf.size > 0) {
>        uint32_t x_offset_sa, y_offset_sa;
>
> +      /* Miptree itself can have an offset only if it represents a single
> +       * slice in an imported buffer object.
> +       * See intel_miptree_create_for_dri_image().
> +       */
> +      assert(mt->level[0].level_x == 0);
> +      assert(mt->level[0].level_y == 0);
> +
>        /* Given level is relative to level zero while the miptree may be
>         * represent just a subset of all levels starting from
> 'first_level'.
>         */
> --
> 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/aee4ba3e/attachment.html>


More information about the mesa-dev mailing list