[Mesa-dev] [PATCH] mesa: Enable EXT_compressed_ETC1_RGB8_sub_texture
Ilia Mirkin
imirkin at alum.mit.edu
Fri Jan 20 18:16:25 UTC 2017
What level of support would a driver need to provide? Can this just be
enabled for all drivers? [This seems like largely a driver-side
feature rather than hardware-based.]
On Fri, Jan 20, 2017 at 1:12 PM, Plamena Manolova
<plamena.manolova at intel.com> wrote:
> Since we already have the functionality in place and games
> like Game of Thrones seem to depend on this extension, I
> think it makes sense to enable it by making it part of
> the extension string even though its still a draft:
>
> https://www.khronos.org/registry/gles/extensions/EXT/EXT_compressed_ETC1_RGB8_sub_texture.txt
>
> Note: OES_compressed_ETC1_RGB8_sub_texture seems to be listed
> in gl2ext.h, but there's no documentation for it in the KHR
> registry
>
> Signed-off-by: Plamena Manolova <plamena.manolova at intel.com>
> ---
> src/mesa/drivers/dri/i965/intel_extensions.c | 1 +
> src/mesa/main/extensions_table.h | 1 +
> src/mesa/main/mtypes.h | 1 +
> src/mesa/main/teximage.c | 5 +++++
> 4 files changed, 8 insertions(+)
>
> diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c
> index b674b2f..bdf2fa5 100644
> --- a/src/mesa/drivers/dri/i965/intel_extensions.c
> +++ b/src/mesa/drivers/dri/i965/intel_extensions.c
> @@ -93,6 +93,7 @@ intelInitExtensions(struct gl_context *ctx)
> ctx->Extensions.EXT_blend_equation_separate = true;
> ctx->Extensions.EXT_blend_func_separate = true;
> ctx->Extensions.EXT_blend_minmax = true;
> + ctx->Extensions.EXT_compressed_ETC1_RGB8_sub_texture = true;
> ctx->Extensions.EXT_draw_buffers2 = true;
> ctx->Extensions.EXT_framebuffer_sRGB = true;
> ctx->Extensions.EXT_gpu_program_parameters = true;
> diff --git a/src/mesa/main/extensions_table.h b/src/mesa/main/extensions_table.h
> index 2de3c59..8b52a97 100644
> --- a/src/mesa/main/extensions_table.h
> +++ b/src/mesa/main/extensions_table.h
> @@ -198,6 +198,7 @@ EXT(EXT_buffer_storage , ARB_buffer_storage
> EXT(EXT_clip_cull_distance , ARB_cull_distance , x , x , x , 30, 2016)
> EXT(EXT_color_buffer_float , dummy_true , x , x , x , 30, 2013)
> EXT(EXT_compiled_vertex_array , dummy_true , GLL, x , x , x , 1996)
> +EXT(EXT_compressed_ETC1_RGB8_sub_texture , EXT_compressed_ETC1_RGB8_sub_texture , x , x , ES1, ES2, 2014)
> EXT(EXT_copy_image , OES_copy_image , x , x , x , 30, 2014)
> EXT(EXT_copy_texture , dummy_true , GLL, x , x , x , 1995)
> EXT(EXT_depth_bounds_test , EXT_depth_bounds_test , GLL, GLC, x , x , 2002)
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index f04ec51..719e248 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -3948,6 +3948,7 @@ struct gl_extensions
> GLboolean EXT_timer_query;
> GLboolean EXT_vertex_array_bgra;
> GLboolean EXT_window_rectangles;
> + GLboolean EXT_compressed_ETC1_RGB8_sub_texture;
> GLboolean OES_copy_image;
> GLboolean OES_primitive_bounding_box;
> GLboolean OES_sample_variables;
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index bc3b76a..14fe4db 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -1323,6 +1323,11 @@ compressedteximage_only_format(const struct gl_context *ctx, GLenum format)
> {
> switch (format) {
> case GL_ETC1_RGB8_OES:
> + if (ctx->Extensions.EXT_compressed_ETC1_RGB8_sub_texture)
> + return false;
> + else
> + return true;
> + break;
> case GL_PALETTE4_RGB8_OES:
> case GL_PALETTE4_RGBA8_OES:
> case GL_PALETTE4_R5_G6_B5_OES:
> --
> 2.4.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list