[Mesa-stable] [Mesa-dev] [PATCH] st/mesa: fix reversed copyimage canonical format
Marek Olšák
maraeo at gmail.com
Sun May 15 10:30:03 UTC 2016
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Marek
On Fri, May 13, 2016 at 8:19 AM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> The format_desc swizzle describes where in the array each color channel
> comes from - but the existing code was written as if each entry in the
> swizzle described the meaning of an array element.
>
> Fixes piglit's arb_copy_image-format-swizzle.
>
> Cc: "11.1 11.2" <mesa-stable at lists.freedesktop.org>
> ---
> src/mesa/state_tracker/st_cb_copyimage.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_cb_copyimage.c b/src/mesa/state_tracker/st_cb_copyimage.c
> index a1cf15f..617e470 100644
> --- a/src/mesa/state_tracker/st_cb_copyimage.c
> +++ b/src/mesa/state_tracker/st_cb_copyimage.c
> @@ -161,9 +161,9 @@ get_canonical_format(enum pipe_format format)
> RETURN_FOR_SWIZZLE4(Z, Y, X, W, PIPE_FORMAT_B8G8R8A8_UNORM);
> RETURN_FOR_SWIZZLE4(Z, Y, X, 1, PIPE_FORMAT_B8G8R8A8_UNORM);
> RETURN_FOR_SWIZZLE4(W, Z, Y, X, PIPE_FORMAT_A8B8G8R8_UNORM);
> - RETURN_FOR_SWIZZLE4(1, Z, Y, X, PIPE_FORMAT_A8B8G8R8_UNORM);
> - RETURN_FOR_SWIZZLE4(W, X, Y, Z, PIPE_FORMAT_A8R8G8B8_UNORM);
> - RETURN_FOR_SWIZZLE4(1, X, Y, Z, PIPE_FORMAT_A8R8G8B8_UNORM);
> + RETURN_FOR_SWIZZLE4(W, Z, Y, 1, PIPE_FORMAT_A8B8G8R8_UNORM);
> + RETURN_FOR_SWIZZLE4(Y, Z, W, X, PIPE_FORMAT_A8R8G8B8_UNORM);
> + RETURN_FOR_SWIZZLE4(Y, Z, W, 1, PIPE_FORMAT_A8R8G8B8_UNORM);
> break;
>
> case 16:
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list