[Mesa-dev] [PATCH] st/mesa: account for texture views when doing CopyImageSubData

Marek Olšák maraeo at gmail.com
Thu Nov 5 01:13:17 PST 2015


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Thu, Nov 5, 2015 at 6:34 AM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
>  src/mesa/state_tracker/st_cb_copyimage.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_cb_copyimage.c b/src/mesa/state_tracker/st_cb_copyimage.c
> index 75114cd..03a7294 100644
> --- a/src/mesa/state_tracker/st_cb_copyimage.c
> +++ b/src/mesa/state_tracker/st_cb_copyimage.c
> @@ -552,6 +552,10 @@ st_CopyImageSubData(struct gl_context *ctx,
>        src_res = src->pt;
>        src_level = src_image->Level;
>        src_z += src_image->Face;
> +      if (src_image->TexObject->Immutable) {
> +         src_level += src_image->TexObject->MinLevel;
> +         src_z += src_image->TexObject->MinLayer;
> +      }
>     } else {
>        struct st_renderbuffer *src = st_renderbuffer(src_renderbuffer);
>        src_res = src->texture;
> @@ -563,6 +567,10 @@ st_CopyImageSubData(struct gl_context *ctx,
>        dst_res = dst->pt;
>        dst_level = dst_image->Level;
>        dst_z += dst_image->Face;
> +      if (dst_image->TexObject->Immutable) {
> +         dst_level += dst_image->TexObject->MinLevel;
> +         dst_z += dst_image->TexObject->MinLayer;
> +      }
>     } else {
>        struct st_renderbuffer *dst = st_renderbuffer(dst_renderbuffer);
>        dst_res = dst->texture;
> --
> 2.4.10
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list