[Fix] (MG_State/Texture): relaxing completeness check on reasonable 0x0 mipmap

This commit is contained in:
2026-01-29 15:17:53 +08:00
parent afc97efcaf
commit ffec1618f1
4 changed files with 18 additions and 4 deletions
@@ -88,6 +88,7 @@ namespace MobileGL {
auto& bindingSlot = activeUnit.GetBindingSlot(textureTarget);
auto textureObject = bindingSlot.GetBoundObject();
TextureInternalFormat textureInternalFormat = textureObject->GetFormat();
MGLOG_D("%s: working on texture %d", __func__, textureObject->GetExternalIndex());
// ===================== Error Checking ==============================
if (!TextureImpl::ValidateTextureObject(textureObject)) return;
@@ -682,6 +683,8 @@ namespace MobileGL {
const SizeT internalBpp = MG_Util::GetInternalBytesPerPixel(textureInternalFormat, texturePixelDataType);
const SizeT internalBytes = width * height * internalBpp;
MGLOG_D("%s: working on texture %d", __func__, textureObject->GetExternalIndex());
MGLOG_D("%s: texture object had internal format %s, new format %s", __func__,
MG_Util::ConvertTextureInternalFormatToString(textureObject->GetFormat()).c_str(),
MG_Util::ConvertTextureInternalFormatToString(textureInternalFormat).c_str());