mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 05:38:31 +09:00
[Fix] (MG_Util, DirectVulkan): tolerate storage-less attachments in component-size queries
GetComponentSizesForInternalFormat asserted on TextureInternalFormat::Unknown, which framebuffer-parameter queries legitimately reach for attachments that have no storage yet (KHR-GL33.packed_depth_stencil.validate_errors.initial_state aborted there). Answer with all-zero sizes and keep a warning for genuinely unhandled formats. Also include the image dimensions in the texture vmaCreateImage failure report.
This commit is contained in:
@@ -503,9 +503,13 @@ namespace MobileGL {
|
||||
s.Depth = 32;
|
||||
s.Stencil = 8;
|
||||
break;
|
||||
case TextureInternalFormat::Unknown:
|
||||
// Queried for attachments that have no storage yet (e.g. framebuffer
|
||||
// parameter queries on the initial state); every size stays 0.
|
||||
break;
|
||||
default:
|
||||
MOBILEGL_ASSERT(false, "Unimplemented internal format in GetComponentSizesForInternalFormat: %d",
|
||||
static_cast<Int>(internal));
|
||||
MGLOG_W("Unimplemented internal format in GetComponentSizesForInternalFormat: %d",
|
||||
static_cast<Int>(internal));
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user