[Mesa-dev] [PATCH v2] mesa: enable ASTC/ETC1 compressed 3D textures

Eric Anholt eric at anholt.net
Tue Jan 30 00:25:57 UTC 2018


"Juan A. Suarez Romero" <jasuarez at igalia.com> writes:

> Enable these kind of 3D texture when proper extensions are available.
>
> Fixes KHR-GLES2.texture_3d.* with these textures.
>
> v2: add better clarification (Eric)
> ---
>  src/mesa/main/teximage.c | 31 ++++++++++++++++++++++++-------
>  1 file changed, 24 insertions(+), 7 deletions(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index e5f8bb0718f..56235898c66 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -1487,6 +1487,9 @@ _mesa_target_can_be_compressed(const struct gl_context *ctx, GLenum target,
>        break;
>     case GL_TEXTURE_3D:
>        switch (layout) {
> +      case MESA_FORMAT_LAYOUT_ETC1:
> +         target_can_be_compresed = ctx->Extensions.OES_compressed_ETC1_RGB8_texture;
> +         break;
>        case MESA_FORMAT_LAYOUT_ETC2:
>           /* See ETC2/EAC comment in case GL_TEXTURE_CUBE_MAP_ARRAY. */

OK, I took a look at the ETC2/EAC comment above, this time, and it looks
like 3D textures are supposed to be not supported with ETC2 or ASTC
according to table 8.17 in GLES 3.2.

This is looking more like a testcase bug to me.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180129/5400f61d/attachment.sig>


More information about the mesa-dev mailing list