mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
st/gl: Fix mip gen for compressed textures
This commit is contained in:
parent
00e7a60077
commit
f989390af6
1 changed files with 8 additions and 6 deletions
|
|
@ -673,7 +673,7 @@ st_TexImage(GLcontext * ctx,
|
|||
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
|
||||
if (compress_with_blit(ctx, target, level, 0, 0, 0, width, height, depth,
|
||||
format, type, pixels, unpack, texImage)) {
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -750,6 +750,7 @@ st_TexImage(GLcontext * ctx,
|
|||
|
||||
_mesa_unmap_teximage_pbo(ctx, unpack);
|
||||
|
||||
done:
|
||||
if (stImage->pt && texImage->Data) {
|
||||
st_texture_image_unmap(ctx->st, stImage);
|
||||
texImage->Data = NULL;
|
||||
|
|
@ -1061,7 +1062,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
|
|||
xoffset, yoffset, zoffset,
|
||||
width, height, depth,
|
||||
format, type, pixels, packing, texImage)) {
|
||||
return;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1110,16 +1111,17 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level,
|
|||
}
|
||||
}
|
||||
|
||||
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
|
||||
ctx->Driver.GenerateMipmap(ctx, target, texObj);
|
||||
}
|
||||
|
||||
_mesa_unmap_teximage_pbo(ctx, packing);
|
||||
|
||||
done:
|
||||
if (stImage->pt) {
|
||||
st_texture_image_unmap(ctx->st, stImage);
|
||||
texImage->Data = NULL;
|
||||
}
|
||||
|
||||
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
|
||||
ctx->Driver.GenerateMipmap(ctx, target, texObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue