This patch:

Reviewed-by: Marek Olšák <marek.ol...@amd.com>

Marek

On Sat, Mar 29, 2014 at 12:02 AM, Chris Forbes <chr...@ijw.co.nz> wrote:
> _mesa_format_matches_format_and_type() returns true for
> GL_RED/GL_RED_INTEGER (with an appropriate type) into an intensity
> mesa_format.
>
> We want the `red`-based format instead, regardless of the order we find
> them in our walk of the mesa formats list.
>
> Signed-off-by: Chris Forbes <chr...@ijw.co.nz>
> ---
>  src/mesa/state_tracker/st_format.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_format.c 
> b/src/mesa/state_tracker/st_format.c
> index cd6b466..62cee1c 100644
> --- a/src/mesa/state_tracker/st_format.c
> +++ b/src/mesa/state_tracker/st_format.c
> @@ -1750,6 +1750,11 @@ st_choose_matching_format(struct pipe_screen *screen, 
> unsigned bind,
>        if (_mesa_get_format_color_encoding(mesa_format) == GL_SRGB) {
>           continue;
>        }
> +      if (_mesa_get_format_bits(mesa_format, GL_TEXTURE_INTENSITY_SIZE) > 0) 
> {
> +         /* if `format` is GL_RED/GL_RED_INTEGER, then we might match some
> +          * intensity formats, which we don't want. */
> +         continue;
> +      }
>
>        if (_mesa_format_matches_format_and_type(mesa_format, format, type,
>                                                 swapBytes)) {
> --
> 1.9.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to