summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat.c
diff options
context:
space:
mode:
authorOliver McFadden <oliver.mcfadden@linux.intel.com>2012-09-26 20:59:50 +0300
committerOliver McFadden <oliver.mcfadden@linux.intel.com>2012-10-01 17:21:51 +0300
commit9545d9611fd983fd63960de787dff51aedd4a7f9 (patch)
tree5fb4803c2cf866a2032d7c39401f9021d36e4d08 /src/mesa/main/texformat.c
parent304beb81bb53f327e835250dc4bf141dff61f535 (diff)
downloadexternal_mesa3d-9545d9611fd983fd63960de787dff51aedd4a7f9.zip
external_mesa3d-9545d9611fd983fd63960de787dff51aedd4a7f9.tar.gz
external_mesa3d-9545d9611fd983fd63960de787dff51aedd4a7f9.tar.bz2
intel: add support for ANGLE_texture_compression_dxt.
Signed-off-by: Oliver McFadden <oliver.mcfadden@linux.intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/mesa/main/texformat.c')
-rw-r--r--src/mesa/main/texformat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c
index 17270ba..f0bc7fd 100644
--- a/src/mesa/main/texformat.c
+++ b/src/mesa/main/texformat.c
@@ -302,7 +302,9 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
}
}
- if (ctx->Extensions.EXT_texture_compression_s3tc) {
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt)) {
switch (internalFormat) {
case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1);
@@ -604,12 +606,16 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target,
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT:
- if (ctx->Extensions.EXT_texture_compression_s3tc)
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt))
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT3);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;
case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:
- if (ctx->Extensions.EXT_texture_compression_s3tc)
+ if (ctx->Extensions.EXT_texture_compression_s3tc ||
+ (ctx->API == API_OPENGLES2 &&
+ ctx->Extensions.ANGLE_texture_compression_dxt))
RETURN_IF_SUPPORTED(MESA_FORMAT_SRGBA_DXT5);
RETURN_IF_SUPPORTED(MESA_FORMAT_SARGB8);
break;