mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
mesa: Handle astc 3d formats in _mesa_get_compressed_formats()
Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
dcfea1d7eb
commit
54cac7ad96
1 changed files with 29 additions and 0 deletions
|
|
@ -438,6 +438,35 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats)
|
|||
}
|
||||
}
|
||||
|
||||
if (_mesa_is_gles3(ctx) &&
|
||||
ctx->Extensions.OES_texture_compression_astc) {
|
||||
if (formats) {
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_3x3x3_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_4x3x3_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_4x4x3_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_4x4x4_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_5x4x4_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_5x5x4_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_5x5x5_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_6x5x5_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_6x6x5_OES;
|
||||
formats[n++] = GL_COMPRESSED_RGBA_ASTC_6x6x6_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_3x3x3_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x3x3_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x3_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4x4_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4x4_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x4_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5x5_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5x5_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x5_OES;
|
||||
formats[n++] = GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6x6_OES;
|
||||
}
|
||||
else {
|
||||
n += 20;
|
||||
}
|
||||
}
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue