[Mesa-dev] [PATCH] st/mesa: fix the texture format in st_context_teximage

Stéphane Marchesin marcheu at chromium.org
Tue Jul 19 12:06:48 PDT 2011


On Mon, Jul 18, 2011 at 07:31, Fredrik Höglund <fredrik at kde.org> wrote:

> Commit 1a339b6c71ebab6e1a64f05b2e133022d3bbcd15 made
> st_ChooseTextureFormat map GL_RGBA with type GL_UNSIGNED_BYTE
> to PIPE_FORMAT_A8B8G8R8_UNORM.
>
> The image format for ARGB pixmaps is PIPE_FORMAT_B8G8R8A8_UNORM
> however. This mismatch caused the texture to be recreated in
> st_finalize_texture.
>
> NOTE: This is a candidate for the 7.11 branch.
>
> Yes very much so.


> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39209
> Signed-off-by: Fredrik Höglund <fredrik at kde.org>
>

Reviewed-by: Stéphane Marchesin <marcheu at chromium.org>

---
>  src/mesa/state_tracker/st_manager.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_manager.c
> b/src/mesa/state_tracker/st_manager.c
> index 7bd82aa..d5228d3 100644
> --- a/src/mesa/state_tracker/st_manager.c
> +++ b/src/mesa/state_tracker/st_manager.c
> @@ -587,7 +587,7 @@ st_context_teximage(struct st_context_iface *stctxi,
>          internalFormat = GL_RGB;
>
>       texFormat = st_ChooseTextureFormat(ctx, internalFormat,
> -                                         GL_RGBA, GL_UNSIGNED_BYTE);
> +                                         GL_BGRA, GL_UNSIGNED_BYTE);
>
>       _mesa_init_teximage_fields(ctx, target, texImage,
>                                  tex->width0, tex->height0, 1, 0,
> --
> 1.7.6
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110719/905d4e2d/attachment.html>


More information about the mesa-dev mailing list