[Mesa-dev] [PATCH] st/mesa: set stencil border color the same as intensity
Ilia Mirkin
imirkin at alum.mit.edu
Tue Apr 3 16:19:53 UTC 2018
Seems reasonable, esp since the gallium format for stencil is (s,s,s,s).
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>
On Tue, Apr 3, 2018 at 11:53 AM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This fixes some stencil border color tests on Vega and Raven chips.
> ---
> src/mesa/state_tracker/st_format.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
> index c50ce1e14bb..3db3c7e967c 100644
> --- a/src/mesa/state_tracker/st_format.c
> +++ b/src/mesa/state_tracker/st_format.c
> @@ -2538,18 +2538,20 @@ st_translate_color(const union gl_color_union *colorIn,
> out[3] = in[3];
> break;
> case GL_LUMINANCE:
> out[0] = out[1] = out[2] = in[0];
> out[3] = 1.0F;
> break;
> case GL_LUMINANCE_ALPHA:
> out[0] = out[1] = out[2] = in[0];
> out[3] = in[3];
> break;
> + /* Stencil border is tricky on some hw. Help drivers a little here. */
> + case GL_STENCIL_INDEX:
> case GL_INTENSITY:
> out[0] = out[1] = out[2] = out[3] = in[0];
> break;
> default:
> COPY_4V(out, in);
> }
> }
> }
> --
> 2.15.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list