<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>><br><br></div>Marek<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 10, 2018 at 12:11 PM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
<br>
Virtually every driver that supports ATI_separate_stencil<br>
also supports EXT_stencil_two_side.<br>
<br>
Use the latter boolean for both extension. With that in mind we can drop<br>
the explicit true from the drivers and the nasty comment in<br>
compute_version().<br>
<br>
Signed-off-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>><br>
---<br>
Noticed while skimming through compute_version(). I don't have a strong<br>
opinion about this patch.<br>
---<br>
 src/mesa/drivers/dri/i915/<wbr>intel_extensions.c |  1 -<br>
 src/mesa/drivers/dri/i965/<wbr>intel_extensions.c |  1 -<br>
 src/mesa/main/extensions.c                   |  1 -<br>
 src/mesa/main/extensions_<wbr>table.h             |  2 +-<br>
 src/mesa/main/mtypes.h                       |  1 -<br>
 src/mesa/main/version.c                      | 10 +---------<br>
 src/mesa/state_tracker/st_<wbr>extensions.c       |  1 -<br>
 7 files changed, 2 insertions(+), 15 deletions(-)<br>
<br>
diff --git a/src/mesa/drivers/dri/i915/<wbr>intel_extensions.c b/src/mesa/drivers/dri/i915/<wbr>intel_extensions.c<br>
index c85bd787fe..9c5398ef85 100644<br>
--- a/src/mesa/drivers/dri/i915/<wbr>intel_extensions.c<br>
+++ b/src/mesa/drivers/dri/i915/<wbr>intel_extensions.c<br>
@@ -89,7 +89,6 @@ intelInitExtensions(struct gl_context *ctx)<br>
       ctx->Extensions.EXT_texture_<wbr>sRGB = true;<br>
       ctx->Extensions.EXT_texture_<wbr>sRGB_decode = true;<br>
       ctx->Extensions.EXT_stencil_<wbr>two_side = true;<br>
-      ctx->Extensions.ATI_separate_<wbr>stencil = true;<br>
       ctx->Extensions.ATI_texture_<wbr>env_combine3 = true;<br>
       ctx->Extensions.NV_texture_<wbr>env_combine4 = true;<br>
<br>
diff --git a/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c b/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
index 73a6c73f53..a9a564d8a6 100644<br>
--- a/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
+++ b/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
@@ -118,7 +118,6 @@ intelInitExtensions(struct gl_context *ctx)<br>
    ctx->Extensions.KHR_robustness = true;<br>
    ctx->Extensions.AMD_seamless_<wbr>cubemap_per_texture = true;<br>
    ctx->Extensions.APPLE_object_<wbr>purgeable = true;<br>
-   ctx->Extensions.ATI_separate_<wbr>stencil = true;<br>
    ctx->Extensions.ATI_texture_<wbr>env_combine3 = true;<br>
    ctx->Extensions.MESA_pack_<wbr>invert = true;<br>
    ctx->Extensions.NV_<wbr>conditional_render = true;<br>
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c<br>
index 38fc52d020..10cd92708f 100644<br>
--- a/src/mesa/main/extensions.c<br>
+++ b/src/mesa/main/extensions.c<br>
@@ -144,7 +144,6 @@ _mesa_enable_sw_extensions(<wbr>struct gl_context *ctx)<br>
    ctx->Extensions.ATI_texture_<wbr>compression_3dc = GL_TRUE;<br>
    ctx->Extensions.ATI_texture_<wbr>env_combine3 = GL_TRUE;<br>
    ctx->Extensions.ATI_texture_<wbr>mirror_once = GL_TRUE;<br>
-   ctx->Extensions.ATI_separate_<wbr>stencil = GL_TRUE;<br>
    ctx->Extensions.EXT_blend_<wbr>color = GL_TRUE;<br>
    ctx->Extensions.EXT_blend_<wbr>equation_separate = GL_TRUE;<br>
    ctx->Extensions.EXT_blend_<wbr>func_separate = GL_TRUE;<br>
diff --git a/src/mesa/main/extensions_<wbr>table.h b/src/mesa/main/extensions_<wbr>table.h<br>
index 492f7c3d20..199dec820f 100644<br>
--- a/src/mesa/main/extensions_<wbr>table.h<br>
+++ b/src/mesa/main/extensions_<wbr>table.h<br>
@@ -187,7 +187,7 @@ EXT(ATI_blend_equation_<wbr>separate             , EXT_blend_equation_separate<br>
 EXT(ATI_draw_buffers                        , dummy_true                             , GLL,  x ,  x ,  x , 2002)<br>
 EXT(ATI_fragment_shader                     , ATI_fragment_shader                    , GLL,  x ,  x ,  x , 2001)<br>
 EXT(ATI_meminfo                             , ATI_meminfo                            , GLL, GLC,  x ,  x , 2009)<br>
-EXT(ATI_separate_stencil                    , ATI_separate_stencil                   , GLL,  x ,  x ,  x , 2006)<br>
+EXT(ATI_separate_stencil                    , EXT_stencil_two_side                   , GLL,  x ,  x ,  x , 2006)<br>
 EXT(ATI_texture_compression_<wbr>3dc             , ATI_texture_compression_3dc            , GLL,  x ,  x ,  x , 2004)<br>
 EXT(ATI_texture_env_combine3                , ATI_texture_env_combine3               , GLL,  x ,  x ,  x , 2002)<br>
 EXT(ATI_texture_float                       , ARB_texture_float                      , GLL, GLC,  x ,  x , 2002)<br>
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h<br>
index b7a7b34a09..c61a4e9bb2 100644<br>
--- a/src/mesa/main/mtypes.h<br>
+++ b/src/mesa/main/mtypes.h<br>
@@ -4333,7 +4333,6 @@ struct gl_extensions<br>
    GLboolean ATI_texture_mirror_once;<br>
    GLboolean ATI_texture_env_combine3;<br>
    GLboolean ATI_fragment_shader;<br>
-   GLboolean ATI_separate_stencil;<br>
    GLboolean GREMEDY_string_marker;<br>
    GLboolean INTEL_conservative_<wbr>rasterization;<br>
    GLboolean INTEL_performance_query;<br>
diff --git a/src/mesa/main/version.c b/src/mesa/main/version.c<br>
index 0a4e7630da..4314556b65 100644<br>
--- a/src/mesa/main/version.c<br>
+++ b/src/mesa/main/version.c<br>
@@ -261,15 +261,7 @@ compute_version(const struct gl_extensions *extensions,<br>
                          extensions->ARB_fragment_<wbr>shader &&<br>
                          extensions->ARB_texture_non_<wbr>power_of_two &&<br>
                          extensions->EXT_blend_<wbr>equation_separate &&<br>
-<br>
-                         /* Technically, 2.0 requires the functionality of the<br>
-                          * EXT version.  Enable 2.0 if either extension is<br>
-                          * available, and assume that a driver that only<br>
-                          * exposes the ATI extension will fallback to<br>
-                          * software when necessary.<br>
-                          */<br>
-                         (extensions->EXT_stencil_two_<wbr>side<br>
-                          || extensions->ATI_separate_<wbr>stencil));<br>
+                         extensions->EXT_stencil_two_<wbr>side);<br>
    const bool ver_2_1 = (ver_2_0 &&<br>
                          extensions->EXT_pixel_buffer_<wbr>object &&<br>
                          extensions->EXT_texture_sRGB);<br>
diff --git a/src/mesa/state_tracker/st_<wbr>extensions.c b/src/mesa/state_tracker/st_<wbr>extensions.c<br>
index 0dc8adb262..86121c98d4 100644<br>
--- a/src/mesa/state_tracker/st_<wbr>extensions.c<br>
+++ b/src/mesa/state_tracker/st_<wbr>extensions.c<br>
@@ -890,7 +890,6 @@ void st_init_extensions(struct pipe_screen *screen,<br>
    extensions->EXT_texture_env_<wbr>dot3 = GL_TRUE;<br>
<br>
    extensions->ATI_fragment_<wbr>shader = GL_TRUE;<br>
-   extensions->ATI_separate_<wbr>stencil = GL_TRUE;<br>
    extensions->ATI_texture_env_<wbr>combine3 = GL_TRUE;<br>
<br>
    extensions->MESA_pack_invert = GL_TRUE;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.16.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>