mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 06:08:30 +09:00
[Feat] (MG_State, MG_Util, MG_Impl/GLImpl, MG_Backend/DirectGLES): desktop-GL single-channel client formats GL_GREEN/GL_BLUE/GL_ALPHA and _INTEGER variants - validate and readback via wide-RGBA channel extraction (GL CTS packed_pixels rgba8_format_green/blue read with them), unpack GREEN/BLUE(_INTEGER) TexImage uploads into the named channel with 0/1 defaults per table 3.3; GL_ALPHA keeps the legacy Red upload mapping (R8 storage + 000R swizzle), its readback corrected at the backend to source channel 3
This commit is contained in:
@@ -65,6 +65,16 @@ namespace MobileGL {
|
||||
return VK_FORMAT_R8G8B8A8_UINT;
|
||||
case TextureInputFormat::BGRAInteger:
|
||||
return VK_FORMAT_B8G8R8A8_UINT;
|
||||
// Single-channel desktop client formats: the client memory holds one component per pixel,
|
||||
// matching the R8 layouts (the channel it feeds is a pixel-transfer concern, not a layout one).
|
||||
case TextureInputFormat::Green:
|
||||
case TextureInputFormat::Blue:
|
||||
case TextureInputFormat::Alpha:
|
||||
return VK_FORMAT_R8_UNORM;
|
||||
case TextureInputFormat::GreenInteger:
|
||||
case TextureInputFormat::BlueInteger:
|
||||
case TextureInputFormat::AlphaInteger:
|
||||
return VK_FORMAT_R8_UINT;
|
||||
case TextureInputFormat::StencilIndex:
|
||||
return VK_FORMAT_S8_UINT;
|
||||
case TextureInputFormat::DepthComponent:
|
||||
|
||||
Reference in New Issue
Block a user