mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 21:58:31 +09:00
[Fix] (MG_Backend/DirectVulkan): use RGBA format as RGB format
- some drivers (Adreno as I tested) lacks VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT on 24-bit RGB formats, use 32-bit ones as a fallback.
This commit is contained in:
@@ -2350,7 +2350,11 @@ void main() {
|
|||||||
"GetOrCreatePipeline: blend is enabled on draw buffer %u but no complete texture attachment is bound",
|
"GetOrCreatePipeline: blend is enabled on draw buffer %u but no complete texture attachment is bound",
|
||||||
i);
|
i);
|
||||||
textureExternalIndex = texture->GetExternalIndex();
|
textureExternalIndex = texture->GetExternalIndex();
|
||||||
colorAttachmentFormat = MG_Util::ConvertTextureInternalFormatToVkEnum(texture->GetFormat());
|
auto* textureResource = m_textureManager->SyncTextureAndGetDescriptor(*texture);
|
||||||
|
MOBILEGL_ASSERT(textureResource != nullptr,
|
||||||
|
"GetOrCreatePipeline: failed to sync blend color attachment textureId=%d",
|
||||||
|
texture->GetExternalIndex());
|
||||||
|
colorAttachmentFormat = textureResource->format;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if MOBILEGL_LOG_ACTIVE_LEVEL <= MOBILEGL_LOG_LEVEL_DEBUG
|
#if MOBILEGL_LOG_ACTIVE_LEVEL <= MOBILEGL_LOG_LEVEL_DEBUG
|
||||||
|
|||||||
Reference in New Issue
Block a user