Merge pull request #1411 from billhollings/blit-from-compressed
Fix issue with vkCmdBlitImage() from compressed textures.
diff --git a/Docs/Whats_New.md b/Docs/Whats_New.md
index 2683e1c..7ea2acb 100644
--- a/Docs/Whats_New.md
+++ b/Docs/Whats_New.md
@@ -20,6 +20,7 @@
- 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 c192d5d..2a3b02a 100644
--- a/MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm
+++ b/MoltenVK/MoltenVK/Commands/MVKCommandResourceFactory.mm
@@ -361,15 +361,16 @@
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";
}
}