[Mesa-dev] [PATCH] st/mesa: fix format query for GL_ARB_texture_rg

Marek Olšák maraeo at gmail.com
Thu Feb 14 15:09:09 PST 2013


Reviewed-by: Marek Olšák <maraeo at gmail.com>

Marek

On Thu, Feb 14, 2013 at 8:26 PM, Brian Paul <brianp at vmware.com> wrote:
> The GL_ARB_texture_rg spec says that we need to support both texturing
> and rendering for the GL_RED and GL_RG formats.  So move the format
> check up into the rendertarget_mapping[] list.  Also, add
> PIPE_FORMAT_R8_UNORM to the list of formats required.
>
> Note: This is a candidate for the stable branches.
> ---
>  src/mesa/state_tracker/st_extensions.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index 4d2d43d..11db9d3 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -421,6 +421,10 @@ void st_init_extensions(struct st_context *st)
>        { { o(EXT_texture_integer) },
>          { PIPE_FORMAT_R32G32B32A32_UINT,
>            PIPE_FORMAT_R32G32B32A32_SINT } },
> +
> +      { { o(ARB_texture_rg) },
> +        { PIPE_FORMAT_R8_UNORM,
> +          PIPE_FORMAT_R8G8_UNORM } },
>     };
>
>     /* Required: depth stencil and sampler support */
> @@ -444,9 +448,6 @@ void st_init_extensions(struct st_context *st)
>            PIPE_FORMAT_RGTC2_UNORM,
>            PIPE_FORMAT_RGTC2_SNORM } },
>
> -      { { o(ARB_texture_rg) },
> -        { PIPE_FORMAT_R8G8_UNORM } },
> -
>        { { o(EXT_texture_compression_latc) },
>          { PIPE_FORMAT_LATC1_UNORM,
>            PIPE_FORMAT_LATC1_SNORM,
> --
> 1.7.3.4
>
> _______________________________________________
> 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