[Fix] (MG_Impl, MG_State, MG_Backend, MG_Util): Do source audit by Codex.

This commit is contained in:
BZLZHH
2026-06-09 15:34:19 +08:00
parent be3c3eb9bb
commit 727939af5b
93 changed files with 6019 additions and 731 deletions
+25 -2
View File
@@ -43,6 +43,10 @@ namespace MobileGL {
case TextureInternalFormat::DepthComponent24:
return 3;
case TextureInternalFormat::RGB10:
case TextureInternalFormat::RGB12:
case TextureInternalFormat::RGB16:
case TextureInternalFormat::RGB16Snorm:
case TextureInternalFormat::RGBA2:
case TextureInternalFormat::RGBA4:
case TextureInternalFormat::RGB5A1:
@@ -54,6 +58,8 @@ namespace MobileGL {
case TextureInternalFormat::RGB10A2:
case TextureInternalFormat::RGB10A2UI:
case TextureInternalFormat::R32F:
case TextureInternalFormat::R32I:
case TextureInternalFormat::R32UI:
case TextureInternalFormat::DepthComponent:
case TextureInternalFormat::DepthComponent32:
case TextureInternalFormat::DepthComponent32F:
@@ -179,6 +185,7 @@ namespace MobileGL {
case TextureInternalFormat::RGB10:
case TextureInternalFormat::RGB12:
case TextureInternalFormat::RGB16:
case TextureInternalFormat::RGB16Snorm:
case TextureInternalFormat::SRGB8:
case TextureInternalFormat::RGB8I:
case TextureInternalFormat::RGB8UI:
@@ -236,7 +243,6 @@ namespace MobileGL {
case TexturePixelDataType::UnsignedInt248:
case TexturePixelDataType::Float32UnsignedInt248Rev:
return 4;
return 4;
default:
return 0;
}
@@ -339,6 +345,22 @@ namespace MobileGL {
s.Green = 8;
s.Blue = 8;
break;
case TextureInternalFormat::RGB10:
s.Red = 10;
s.Green = 10;
s.Blue = 10;
break;
case TextureInternalFormat::RGB12:
s.Red = 12;
s.Green = 12;
s.Blue = 12;
break;
case TextureInternalFormat::RGB16:
case TextureInternalFormat::RGB16Snorm:
s.Red = 16;
s.Green = 16;
s.Blue = 16;
break;
case TextureInternalFormat::R3G3B2:
s.Red = 3;
@@ -370,7 +392,6 @@ namespace MobileGL {
case TextureInternalFormat::RGBA8UI:
case TextureInternalFormat::SRGB8Alpha8:
case TextureInternalFormat::RGBA:
break;
s.Red = 8;
s.Green = 8;
s.Blue = 8;
@@ -385,6 +406,8 @@ namespace MobileGL {
break;
case TextureInternalFormat::R32F:
case TextureInternalFormat::R32I:
case TextureInternalFormat::R32UI:
s.Red = 32;
break;
case TextureInternalFormat::RG32F: