diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c index 3bde7a5ca75..be8107afec9 100644 --- a/src/mesa/state_tracker/st_gen_mipmap.c +++ b/src/mesa/state_tracker/st_gen_mipmap.c @@ -129,6 +129,14 @@ st_generate_mipmap(struct gl_context *ctx, GLenum target, if (texObj->Sampler.Attrib.sRGBDecode == GL_SKIP_DECODE_EXT) format = util_format_linear(format); + /* For fallback formats, we need to update both the compressed and + * uncompressed images. + */ + if (st_compressed_format_fallback(st, _mesa_base_tex_image(texObj)->TexFormat)) { + _mesa_generate_mipmap(ctx, target, texObj); + return; + } + /* First see if the driver supports hardware mipmap generation, * if not then generate the mipmap by rendering/texturing. * If that fails, use the software fallback.