<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Jan 20, 2017 at 10:16 AM, Ilia Mirkin <span dir="ltr"><<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What level of support would a driver need to provide? Can this just be<br>
enabled for all drivers? [This seems like largely a driver-side<br>
feature rather than hardware-based.]<br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>My understanding is that we should just expose this extension on all hardware that supports ETC1.  Obviously, if it doesn't support ETC1, you don't get this extension. :-)<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
On Fri, Jan 20, 2017 at 1:12 PM, Plamena Manolova<br>
<<a href="mailto:plamena.manolova@intel.com">plamena.manolova@intel.com</a>> wrote:<br>
> Since we already have the functionality in place and games<br>
> like Game of Thrones seem to depend on this extension, I<br>
> think it makes sense to enable it by making it part of<br>
> the extension string even though its still a draft:<br>
><br>
> <a href="https://www.khronos.org/registry/gles/extensions/EXT/EXT_compressed_ETC1_RGB8_sub_texture.txt" rel="noreferrer" target="_blank">https://www.khronos.org/<wbr>registry/gles/extensions/EXT/<wbr>EXT_compressed_ETC1_RGB8_sub_<wbr>texture.txt</a><br>
><br>
> Note: OES_compressed_ETC1_RGB8_sub_<wbr>texture seems to be listed<br>
> in gl2ext.h, but there's no documentation for it in the KHR<br>
> registry<br>
><br>
> Signed-off-by: Plamena Manolova <<a href="mailto:plamena.manolova@intel.com">plamena.manolova@intel.com</a>><br>
> ---<br>
>  src/mesa/drivers/dri/i965/<wbr>intel_extensions.c | 1 +<br>
>  src/mesa/main/extensions_<wbr>table.h             | 1 +<br>
>  src/mesa/main/mtypes.h                       | 1 +<br>
>  src/mesa/main/teximage.c                     | 5 +++++<br>
>  4 files changed, 8 insertions(+)<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 b674b2f..bdf2fa5 100644<br>
> --- a/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
> +++ b/src/mesa/drivers/dri/i965/<wbr>intel_extensions.c<br>
> @@ -93,6 +93,7 @@ intelInitExtensions(struct gl_context *ctx)<br>
>     ctx->Extensions.EXT_blend_<wbr>equation_separate = true;<br>
>     ctx->Extensions.EXT_blend_<wbr>func_separate = true;<br>
>     ctx->Extensions.EXT_blend_<wbr>minmax = true;<br>
> +   ctx->Extensions.EXT_<wbr>compressed_ETC1_RGB8_sub_<wbr>texture = true;<br>
>     ctx->Extensions.EXT_draw_<wbr>buffers2 = true;<br>
>     ctx->Extensions.EXT_<wbr>framebuffer_sRGB = true;<br>
>     ctx->Extensions.EXT_gpu_<wbr>program_parameters = true;<br>
> diff --git a/src/mesa/main/extensions_<wbr>table.h b/src/mesa/main/extensions_<wbr>table.h<br>
> index 2de3c59..8b52a97 100644<br>
> --- a/src/mesa/main/extensions_<wbr>table.h<br>
> +++ b/src/mesa/main/extensions_<wbr>table.h<br>
> @@ -198,6 +198,7 @@ EXT(EXT_buffer_storage                      , ARB_buffer_storage<br>
>  EXT(EXT_clip_cull_distance                  , ARB_cull_distance                      ,  x ,  x ,  x ,  30, 2016)<br>
>  EXT(EXT_color_buffer_float                  , dummy_true                             ,  x ,  x ,  x ,  30, 2013)<br>
>  EXT(EXT_compiled_vertex_array               , dummy_true                             , GLL,  x ,  x ,  x , 1996)<br>
> +EXT(EXT_compressed_ETC1_RGB8_<wbr>sub_texture    , EXT_compressed_ETC1_RGB8_sub_<wbr>texture   ,  x ,  x , ES1, ES2, 2014)<br>
>  EXT(EXT_copy_image                          , OES_copy_image                         ,  x ,  x ,  x ,  30, 2014)<br>
>  EXT(EXT_copy_texture                        , dummy_true                             , GLL,  x ,  x ,  x , 1995)<br>
>  EXT(EXT_depth_bounds_test                   , EXT_depth_bounds_test                  , GLL, GLC,  x ,  x , 2002)<br>
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h<br>
> index f04ec51..719e248 100644<br>
> --- a/src/mesa/main/mtypes.h<br>
> +++ b/src/mesa/main/mtypes.h<br>
> @@ -3948,6 +3948,7 @@ struct gl_extensions<br>
>     GLboolean EXT_timer_query;<br>
>     GLboolean EXT_vertex_array_bgra;<br>
>     GLboolean EXT_window_rectangles;<br>
> +   GLboolean EXT_compressed_ETC1_RGB8_sub_<wbr>texture;<br>
>     GLboolean OES_copy_image;<br>
>     GLboolean OES_primitive_bounding_box;<br>
>     GLboolean OES_sample_variables;<br>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
> index bc3b76a..14fe4db 100644<br>
> --- a/src/mesa/main/teximage.c<br>
> +++ b/src/mesa/main/teximage.c<br>
> @@ -1323,6 +1323,11 @@ compressedteximage_only_<wbr>format(const struct gl_context *ctx, GLenum format)<br>
>  {<br>
>     switch (format) {<br>
>     case GL_ETC1_RGB8_OES:<br>
> +      if (ctx->Extensions.EXT_<wbr>compressed_ETC1_RGB8_sub_<wbr>texture)<br>
> +         return false;<br>
> +      else<br>
> +         return true;<br>
> +      break;<br>
>     case GL_PALETTE4_RGB8_OES:<br>
>     case GL_PALETTE4_RGBA8_OES:<br>
>     case GL_PALETTE4_R5_G6_B5_OES:<br>
> --<br>
> 2.4.3<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>
______________________________<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>
</div></div></blockquote></div><br></div></div>