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

Dave Airlie airlied at gmail.com
Sat Apr 4 23:48:49 PDT 2015


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



More information about the mesa-dev mailing list