diff options
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/extensions.c | 4 | ||||
-rw-r--r-- | src/mesa/main/glformats.c | 3 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 1 | ||||
-rw-r--r-- | src/mesa/main/texcompress.c | 4 | ||||
-rw-r--r-- | src/mesa/main/texformat.c | 7 | ||||
-rw-r--r-- | src/mesa/main/teximage.c | 3 |
6 files changed, 13 insertions, 9 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index fd25d31c6af..375978e8270 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -201,7 +201,7 @@ static const struct extension extension_table[] = { { "GL_EXT_subtexture", o(dummy_true), GLL, 1995 }, { "GL_EXT_texture3D", o(EXT_texture3D), GLL, 1996 }, { "GL_EXT_texture_array", o(EXT_texture_array), GL, 2006 }, - { "GL_EXT_texture_compression_dxt1", o(EXT_texture_compression_s3tc), GL | ES1 | ES2, 2004 }, + { "GL_EXT_texture_compression_dxt1", o(ANGLE_texture_compression_dxt), GL | ES1 | ES2, 2004 }, { "GL_ANGLE_texture_compression_dxt3", o(ANGLE_texture_compression_dxt), ES2, 2011 }, { "GL_ANGLE_texture_compression_dxt5", o(ANGLE_texture_compression_dxt), ES2, 2011 }, { "GL_EXT_texture_compression_latc", o(EXT_texture_compression_latc), GL, 2006 }, @@ -321,7 +321,7 @@ static const struct extension extension_table[] = { { "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 }, { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GLL, 1999 }, { "GL_NV_texture_rectangle", o(NV_texture_rectangle), GLL, 2000 }, - { "GL_S3_s3tc", o(S3_s3tc), GL, 1999 }, + { "GL_S3_s3tc", o(ANGLE_texture_compression_dxt), GL, 1999 }, { "GL_SGIS_generate_mipmap", o(dummy_true), GLL, 1997 }, { "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GLL, 1997 }, { "GL_SGIS_texture_edge_clamp", o(dummy_true), GLL, 1997 }, diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index e4f784179c2..fc8bc2e3c3c 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -878,7 +878,8 @@ _mesa_is_compressed_format(struct gl_context *ctx, GLenum format) case GL_RGB4_S3TC: case GL_RGBA_S3TC: case GL_RGBA4_S3TC: - return _mesa_is_desktop_gl(ctx) && ctx->Extensions.S3_s3tc; + return _mesa_is_desktop_gl(ctx) && + ctx->Extensions.ANGLE_texture_compression_dxt; case GL_COMPRESSED_SRGB_S3TC_DXT1_EXT: case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT: case GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT: diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index ead75d50eb5..d37e6c4c04d 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -3130,7 +3130,6 @@ struct gl_extensions GLboolean NV_texture_env_combine4; GLboolean NV_texture_rectangle; GLboolean TDFX_texture_compression_FXT1; - GLboolean S3_s3tc; GLboolean OES_EGL_image; GLboolean OES_draw_texture; GLboolean OES_depth_texture_cube_map; diff --git a/src/mesa/main/texcompress.c b/src/mesa/main/texcompress.c index 077a967da7e..734294e4536 100644 --- a/src/mesa/main/texcompress.c +++ b/src/mesa/main/texcompress.c @@ -37,6 +37,7 @@ #include "formats.h" #include "mfeatures.h" #include "mtypes.h" +#include "context.h" #include "texcompress.h" #include "texcompress_fxt1.h" #include "texcompress_rgtc.h" @@ -264,7 +265,8 @@ _mesa_get_compressed_formats(struct gl_context *ctx, GLint *formats) n += 3; } } - if (ctx->Extensions.S3_s3tc) { + if (_mesa_is_desktop_gl(ctx) + && ctx->Extensions.ANGLE_texture_compression_dxt) { if (formats) { formats[n++] = GL_RGB_S3TC; formats[n++] = GL_RGB4_S3TC; diff --git a/src/mesa/main/texformat.c b/src/mesa/main/texformat.c index 4fb4b70f973..b0ff6ec73c3 100644 --- a/src/mesa/main/texformat.c +++ b/src/mesa/main/texformat.c @@ -251,7 +251,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, */ if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) { if (ctx->Extensions.EXT_texture_compression_s3tc || - ctx->Extensions.S3_s3tc) + ctx->Extensions.ANGLE_texture_compression_dxt) RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_DXT1); if (ctx->Extensions.TDFX_texture_compression_FXT1) RETURN_IF_SUPPORTED(MESA_FORMAT_RGB_FXT1); @@ -264,7 +264,7 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, /* We don't use texture compression for 1D and 1D array textures. */ if (target != GL_TEXTURE_1D && target != GL_TEXTURE_1D_ARRAY) { if (ctx->Extensions.EXT_texture_compression_s3tc || - ctx->Extensions.S3_s3tc) + ctx->Extensions.ANGLE_texture_compression_dxt) RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_DXT3); /* Not rgba_dxt1, see spec */ if (ctx->Extensions.TDFX_texture_compression_FXT1) RETURN_IF_SUPPORTED(MESA_FORMAT_RGBA_FXT1); @@ -329,7 +329,8 @@ _mesa_choose_tex_format(struct gl_context *ctx, GLenum target, } } - if (ctx->Extensions.S3_s3tc) { + if (_mesa_is_desktop_gl(ctx) + && ctx->Extensions.ANGLE_texture_compression_dxt) { switch (internalFormat) { case GL_RGB_S3TC: case GL_RGB4_S3TC: diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 24a55106147..fdeecf3cfd4 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -215,7 +215,8 @@ _mesa_base_tex_format( struct gl_context *ctx, GLint internalFormat ) } } - if (ctx->Extensions.S3_s3tc) { + if (_mesa_is_desktop_gl(ctx) + && ctx->Extensions.ANGLE_texture_compression_dxt) { switch (internalFormat) { case GL_RGB_S3TC: case GL_RGB4_S3TC: |