mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
mesa/st: use _mesa_generate_mipmap for fallback-formats
For fallback formats, we need to update both the compressed and
uncompressed images. Let's fall back to _mesa_generate_mipmap that
already handles this.
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Acked-by: Eric Engestrom <eric@igalia.com>
Fixes: e4ff42684b ("mesa/st: enable bptc extension with fallback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18180>
This commit is contained in:
parent
e51c5a18ad
commit
b6f6b43c76
1 changed files with 8 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue