mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 14:18:31 +09:00
[Fix] (TextureState): fix a horrible performance bug
This commit is contained in:
@@ -963,7 +963,7 @@ GLenum TextureState::CheckUpdatingTextureRegion2DValidity_(GLenum target, GLint
|
|||||||
return GL_INVALID_OPERATION;
|
return GL_INVALID_OPERATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tex = textures[boundTex];
|
const auto& tex = textures[boundTex];
|
||||||
|
|
||||||
if (tex.IsImmutable()) {
|
if (tex.IsImmutable()) {
|
||||||
MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ texture is immutable");
|
MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ texture is immutable");
|
||||||
@@ -1002,7 +1002,7 @@ GLenum TextureState::CheckUpdatingTextureRegion2DValidity_(GLenum target, GLint
|
|||||||
return GL_INVALID_OPERATION;
|
return GL_INVALID_OPERATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureParams::MipmapLevel& mip = mipIt->second;
|
const auto& mip = mipIt->second;
|
||||||
if (xoffset + width > mip.width || yoffset + height > mip.height) {
|
if (xoffset + width > mip.width || yoffset + height > mip.height) {
|
||||||
MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ region out of bounds: "
|
MG_Util::Debug::LogE("MG_State: Texture: CheckUpdatingTextureRegion2DValidity_ region out of bounds: "
|
||||||
"x=%d+%d > %d or y=%d+%d > %d",
|
"x=%d+%d > %d or y=%d+%d > %d",
|
||||||
|
|||||||
Reference in New Issue
Block a user