On Sun, Apr 5, 2015 at 8:52 AM, Ilia Mirkin <imir...@alum.mit.edu> wrote: > On Sun, Apr 5, 2015 at 2:48 AM, Dave Airlie <airl...@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 <airl...@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?
Also don't you need to manually disable e.g. the depth test, since gallium will be receiving a Z24S8 texture. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev