<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 10, 2018 at 12:27 PM, Roland Scheidegger <span dir="ltr"><<a href="mailto:sroland@vmware.com" target="_blank">sroland@vmware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Yes, there is indeed plenty hw (all with d3d heritage, d3d10 doesn't<br>
support different ref/masks) which don't actually have full support for<br>
two-sided stencil.<br>
I think all drivers just cheat and fail though since they really want to<br>
expose GL 2 anyway.<br>
So I suppose that's ok, albeit I don't really have an opinion on it.<br></blockquote><div><br></div><div>r300 hw can't do the EXT one, but the driver emulates it by converting each draw call into two, one for each side.<br><br></div><div>Marek<br></div><div><br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="m_-2662030875474871332HOEnZb"><font color="#888888"><br>
Roland<br>
</font></span><div class="m_-2662030875474871332HOEnZb"><div class="m_-2662030875474871332h5"><br>
<br>
Am 10.04.2018 um 18:11 schrieb Emil Velikov:<br>
> From: Emil Velikov <<a href="mailto:emil.velikov@collabora.com" target="_blank">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" target="_blank">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/inte<wbr>l_extensions.c | 1 -<br>
> src/mesa/drivers/dri/i965/inte<wbr>l_extensions.c | 1 -<br>
> src/mesa/main/extensions.c | 1 -<br>
> src/mesa/main/extensions_table<wbr>.h | 2 +-<br>
> src/mesa/main/mtypes.h | 1 -<br>
> src/mesa/main/version.c | 10 +---------<br>
> src/mesa/state_tracker/st_exte<wbr>nsions.c | 1 -<br>
> 7 files changed, 2 insertions(+), 15 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/dri/i915/in<wbr>tel_extensions.c b/src/mesa/drivers/dri/i915/in<wbr>tel_extensions.c<br>
> index c85bd787fe..9c5398ef85 100644<br>
> --- a/src/mesa/drivers/dri/i915/in<wbr>tel_extensions.c<br>
> +++ b/src/mesa/drivers/dri/i915/in<wbr>tel_extensions.c<br>
> @@ -89,7 +89,6 @@ intelInitExtensions(struct gl_context *ctx)<br>
> ctx->Extensions.EXT_texture_sR<wbr>GB = true;<br>
> ctx->Extensions.EXT_texture_sR<wbr>GB_decode = true;<br>
> ctx->Extensions.EXT_stencil_tw<wbr>o_side = true;<br>
> - ctx->Extensions.ATI_separate_s<wbr>tencil = true;<br>
> ctx->Extensions.ATI_texture_en<wbr>v_combine3 = true;<br>
> ctx->Extensions.NV_texture_env<wbr>_combine4 = true;<br>
><br>
> diff --git a/src/mesa/drivers/dri/i965/in<wbr>tel_extensions.c b/src/mesa/drivers/dri/i965/in<wbr>tel_extensions.c<br>
> index 73a6c73f53..a9a564d8a6 100644<br>
> --- a/src/mesa/drivers/dri/i965/in<wbr>tel_extensions.c<br>
> +++ b/src/mesa/drivers/dri/i965/in<wbr>tel_extensions.c<br>
> @@ -118,7 +118,6 @@ intelInitExtensions(struct gl_context *ctx)<br>
> ctx->Extensions.KHR_<wbr>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_e<wbr>nv_combine3 = true;<br>
> ctx->Extensions.MESA_pack_inv<wbr>ert = true;<br>
> ctx->Extensions.NV_conditiona<wbr>l_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(str<wbr>uct gl_context *ctx)<br>
> ctx->Extensions.ATI_texture_c<wbr>ompression_3dc = GL_TRUE;<br>
> ctx->Extensions.ATI_texture_e<wbr>nv_combine3 = GL_TRUE;<br>
> ctx->Extensions.ATI_texture_m<wbr>irror_once = GL_TRUE;<br>
> - ctx->Extensions.ATI_separate_<wbr>stencil = GL_TRUE;<br>
> ctx->Extensions.EXT_blend_col<wbr>or = GL_TRUE;<br>
> ctx->Extensions.EXT_blend_equ<wbr>ation_separate = GL_TRUE;<br>
> ctx->Extensions.EXT_blend_fun<wbr>c_separate = GL_TRUE;<br>
> diff --git a/src/mesa/main/extensions_tab<wbr>le.h b/src/mesa/main/extensions_tab<wbr>le.h<br>
> index 492f7c3d20..199dec820f 100644<br>
> --- a/src/mesa/main/extensions_tab<wbr>le.h<br>
> +++ b/src/mesa/main/extensions_tab<wbr>le.h<br>
> @@ -187,7 +187,7 @@ EXT(ATI_blend_equation_separat<wbr>e , 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_3d<wbr>c , 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_rasterizati<wbr>on;<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_shad<wbr>er &&<br>
> extensions->ARB_texture_non_p<wbr>ower_of_two &&<br>
> extensions->EXT_blend_equatio<wbr>n_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_stenc<wbr>il));<br>
> + extensions->EXT_stencil_two_s<wbr>ide);<br>
> const bool ver_2_1 = (ver_2_0 &&<br>
> extensions->EXT_pixel_buffer_<wbr>object &&<br>
> extensions->EXT_texture_sRGB)<wbr>;<br>
> diff --git a/src/mesa/state_tracker/st_ex<wbr>tensions.c b/src/mesa/state_tracker/st_ex<wbr>tensions.c<br>
> index 0dc8adb262..86121c98d4 100644<br>
> --- a/src/mesa/state_tracker/st_ex<wbr>tensions.c<br>
> +++ b/src/mesa/state_tracker/st_ex<wbr>tensions.c<br>
> @@ -890,7 +890,6 @@ void st_init_extensions(struct pipe_screen *screen,<br>
> extensions->EXT_texture_env_d<wbr>ot3 = GL_TRUE;<br>
><br>
> extensions->ATI_fragment_shad<wbr>er = GL_TRUE;<br>
> - extensions->ATI_separate_sten<wbr>cil = GL_TRUE;<br>
> extensions->ATI_texture_env_c<wbr>ombine3 = GL_TRUE;<br>
><br>
> extensions->MESA_pack_invert = GL_TRUE;<br>
><br>
<br>
</div></div><div class="m_-2662030875474871332HOEnZb"><div class="m_-2662030875474871332h5">______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">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>
</div></div></blockquote></div><br></div></div>