Merge pull request #1399 from billhollings/e5b9g9r9-disable-blending

Disable blending for VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 on macOS Apple Silicon.
This commit is contained in:
Bill Hollings 2021-07-08 22:18:00 -04:00 committed by GitHub
commit a7ffaad975
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,8 @@ Released TBD
- 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
`VK_FORMAT_E5B9G9R9_UFLOAT_PACK32` on macOS Apple Silicon.

View File

@ -1546,7 +1546,10 @@ void MVKPixelFormats::modifyMTLFormatCapabilities(id<MTLDevice> mtlDevice) {
addGPUOSMTLPixFmtCaps( Apple5, 10.16, RGBA8Unorm_sRGB, All );
addGPUOSMTLPixFmtCaps( Apple5, 10.16, BGRA8Unorm_sRGB, All );
// Blending is actually supported for this format, but format channels cannot be individually write-enabled during blending.
// Disabling blending is the least-intrusive way to handle this in a Vulkan-friendly way.
addGPUOSMTLPixFmtCaps( Apple5, 10.16, RGB9E5Float, All );
disableMTLPixFmtCaps ( RGB9E5Float, Blend);
addGPUOSMTLPixFmtCaps( Apple5, 10.16, PVRTC_RGBA_2BPP, RF );
addGPUOSMTLPixFmtCaps( Apple5, 10.16, PVRTC_RGBA_2BPP_sRGB, RF );