[Mesa-dev] [PATCH 3/4] st/mesa: add ARB_texture_stencil8 enable

Ilia Mirkin imirkin at alum.mit.edu
Sun Apr 5 05:52:06 PDT 2015


On Sun, Apr 5, 2015 at 2:48 AM, Dave Airlie <airlied at gmail.com> wrote:
> if we support stencil texturing, enable texture_stencil8
> there is no requirement to support native S8 for this,
> the texture can be converted to x24s8 fine.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/mesa/state_tracker/st_extensions.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
> index bc20f73..1867bf3 100644
> --- a/src/mesa/state_tracker/st_extensions.c
> +++ b/src/mesa/state_tracker/st_extensions.c
> @@ -502,6 +502,8 @@ void st_init_extensions(struct pipe_screen *screen,
>        { { o(ARB_depth_buffer_float) },
>          { PIPE_FORMAT_Z32_FLOAT,
>            PIPE_FORMAT_Z32_FLOAT_S8X24_UINT } },
> +      { { o(ARB_texture_stencil8) },
> +        { PIPE_FORMAT_S8_UINT } },
>     };
>
>     /* Required: sampler support */
> @@ -558,7 +560,8 @@ void st_init_extensions(struct pipe_screen *screen,
>
>        { { o(ARB_stencil_texturing) },
>          { PIPE_FORMAT_X24S8_UINT,
> -          PIPE_FORMAT_S8X24_UINT },
> +          PIPE_FORMAT_S8X24_UINT,
> +          PIPE_FORMAT_S8_UINT },

S8_UINT has nothing to do with ARB_stencil_texturing -- that's just
about packed depth stencil.

>          GL_TRUE }, /* at least one format must be supported */
>     };
>
> @@ -650,6 +653,9 @@ void st_init_extensions(struct pipe_screen *screen,
>                            ARRAY_SIZE(vertex_mapping), PIPE_BUFFER,
>                            PIPE_BIND_VERTEX_BUFFER);
>
> +   if (extensions->ARB_stencil_texturing)
> +      extensions->ARB_texture_stencil8 = GL_TRUE;

Where do you set texobj->StencilTexturing = true to support this?

> +
>     /* Figure out GLSL support. */
>     glsl_feature_level = screen->get_param(screen, PIPE_CAP_GLSL_FEATURE_LEVEL);
>
> --
> 1.9.3
>
> _______________________________________________
> 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