diff options
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 64b77d864c2..22cd6de5640 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -43,6 +43,7 @@ #include "main/depth.h" #include "main/enable.h" #include "main/fbobject.h" +#include "main/formats.h" #include "main/image.h" #include "main/macros.h" #include "main/matrix.h" @@ -2083,7 +2084,7 @@ _mesa_meta_check_generate_mipmap_fallback(GLcontext *ctx, GLenum target, srcLevel = texObj->BaseLevel; baseImage = _mesa_select_tex_image(ctx, texObj, target, srcLevel); - if (!baseImage || baseImage->IsCompressed) { + if (!baseImage || _mesa_is_format_compressed(baseImage->TexFormat)) { return GL_TRUE; } @@ -2492,11 +2493,11 @@ copy_tex_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, return; } - if (texImage->TexFormat == &_mesa_null_texformat) - texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx, - internalFormat, - format, - type); + if (texImage->TexFormat == MESA_FORMAT_NONE) + texImage->TexFormat = ctx->Driver.ChooseTextureFormat(ctx, + internalFormat, + format, + type); _mesa_unlock_texture(ctx, texObj); /* need to unlock first */ @@ -2593,7 +2594,7 @@ copy_tex_sub_image(GLcontext *ctx, GLuint dims, GLenum target, GLint level, texObj = _mesa_select_tex_object(ctx, texUnit, target); texImage = _mesa_select_tex_image(ctx, texObj, target, level); - format = texImage->TexFormat->BaseFormat; + format = _mesa_get_format_base_format(texImage->TexFormat); type = get_temp_image_type(ctx, format); bpp = _mesa_bytes_per_pixel(format, type); if (bpp <= 0) { |