mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
[Feat] (DirectVulkan): upload combined depth-stencil texture data
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).
This commit is contained in:
@@ -481,6 +481,9 @@ private:
|
||||
std::unordered_map<TextureIdentity, TextureResource, TextureIdentityHash> m_textureResources;
|
||||
// Textures that have been bound to a GL image unit (see MarkStorageImageTexture).
|
||||
std::unordered_set<TextureIdentity, TextureIdentityHash> m_storageImageTextures;
|
||||
// Supported multisample counts per format, so repeat texture syncs do not
|
||||
// re-query vkGetPhysicalDeviceImageFormatProperties.
|
||||
std::unordered_map<VkFormat, VkSampleCountFlags> m_multisampleCountsByFormat;
|
||||
Vector<Vector<TextureResource>> m_deferredReleases;
|
||||
Vector<Vector<VkImageView>> m_deferredViewReleases;
|
||||
// Texture uploads are submitted out-of-band but NOT waited on (waiting
|
||||
|
||||
Reference in New Issue
Block a user