From 665dbfd632d850310b033ee2a703eba8f5c16171 Mon Sep 17 00:00:00 2001 From: Bill Hollings Date: Tue, 27 Jul 2021 18:08:50 -0400 Subject: [PATCH] Fix issue with vkCmdBlitImage() from compressed textures. --- Docs/Whats_New.md | 1 + MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Docs/Whats_New.md b/Docs/Whats_New.md index 2683e1cb..7ea2acb1 100644 --- a/Docs/Whats_New.md +++ b/Docs/Whats_New.md @@ -20,6 +20,7 @@ Released TBD - Vulkan timestamp query pools use Metal GPU counters when available. - Fix issue where swapchain images were acquired out of order under heavy load. +- Fix issue with `vkCmdBlitImage()` from compressed textures. - Fix incorrect translation of clear color values on Apple Silicon. - Fix swizzle of depth and stencil values into RGBA (`float4`) variable in shaders. - Disable `VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT` for diff --git a/MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm b/MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm index c192d5de..2a3b02a4 100644 --- a/MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm +++ b/MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm @@ -361,15 +361,16 @@ id MVKCommandResourceFactory::newClearFragFunction(MVKRPSKeyClearAt NSString* MVKCommandResourceFactory::getMTLFormatTypeString(MTLPixelFormat mtlPixFmt) { switch (getPixelFormats()->getFormatType(mtlPixFmt)) { - case kMVKFormatColorHalf: return @"half"; - case kMVKFormatColorFloat: return @"float"; case kMVKFormatColorInt8: case kMVKFormatColorInt16: return @"short"; case kMVKFormatColorUInt8: case kMVKFormatColorUInt16: return @"ushort"; case kMVKFormatColorInt32: return @"int"; case kMVKFormatColorUInt32: return @"uint"; - case kMVKFormatDepthStencil: return @"float"; + case kMVKFormatColorHalf: return @"half"; + case kMVKFormatColorFloat: + case kMVKFormatDepthStencil: + case kMVKFormatCompressed: return @"float"; default: return @"unexpected_type"; } }