mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-08 20:28:32 +09:00
UploadDirtyMipLevels used to skip D24S8/D32FS8 textures outright, leaving glTexImage-supplied depth-stencil data unuploaded (KHR-GL33 texture_repeat_mode depth24_stencil8 and texture_swizzle depth-stencil cases all sampled zeros). De-interleave the shadow's GL wire format into a depth plane (X8_D24 word / float) and a stencil byte plane and record one copy per aspect, with cross-conversion when the device backs the texture with the other depth-stencil format. Depth32FStencil8's shadow byte size also claimed 16 bytes/texel while the stored wire format (GL_FLOAT_32_UNSIGNED_INT_24_8_REV) is 8; that mismatch truncated every upload of it. Also route a multisample-texture sample-count request through the device's supported counts (round up, GL promises at-least semantics).