mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-09 04:38:30 +09:00
Depth textures previously raw-copied whatever the client handed over into the Vulkan image, so any client format other than the image's exact texel layout uploaded garbage (float DEPTH_COMPONENT data read as 16-bit words, GL_TEXTURE_1D/2D alike). The shadow now has a defined canonical layout - unorm16 for DEPTH_COMPONENT16, a full-scale unorm32 word for the 24/32-bit fixed depths, float for DEPTH_COMPONENT32F - produced by the pixel-store unpack converter (new DepthComponent channel mapping + UNorm32 component). GL_DEPTH_COMPONENT client data may also fill packed depth-stencil internals (stencil half zero). The Vulkan uploader converts shadow words to the image texel layout per aspect, and X8_D24_UNORM falls back to D32_SFLOAT where optimal tiling lacks support (lavapipe). texture_size_promotion.functional and packed_depth_stencil.verify_copy_tex_image.* now pass.