Enable VK_AMD_shader_image_load_store_lod for Apple Silicon on Mac.

This commit is contained in:
Chip Davis 2020-10-28 15:25:59 -05:00
parent 5be7b2d8d5
commit 51afe4745e
4 changed files with 4 additions and 2 deletions

View File

@ -324,7 +324,7 @@ In addition to core *Vulkan* functionality, **MoltenVK** also supports the foll
- `VK_MVK_moltenvk`
- `VK_AMD_gpu_shader_half_float`
- `VK_AMD_negative_viewport_height`
- `VK_AMD_shader_image_load_store_lod` *(iOS and tvOS)*
- `VK_AMD_shader_image_load_store_lod` *(requires Apple GPU)*
- `VK_AMD_shader_trinary_minmax` *(requires Metal 2.1)*
- `VK_IMG_format_pvrtc` *(requires Apple GPU)*
- `VK_INTEL_shader_integer_functions2`

View File

@ -21,6 +21,7 @@ Released TBD
- Add support for extensions:
- `VK_EXT_descriptor_indexing` (initial release limited to Metal Tier 1: 96/128 textures, 16 samplers)
- `VK_EXT_private_data`
- `VK_AMD_shader_image_load_store` (macOS)
- `VK_IMG_format_pvrtc` (macOS)
- Use `VK_KHR_image_format_list` to disable `MTLTextureUsagePixelFormatView`
if only swizzles or `sRGB` conversion will be used for image views, improving

View File

@ -2499,6 +2499,7 @@ void MVKPhysicalDevice::initExtensions() {
}
#if MVK_MACOS
if (!supportsMTLGPUFamily(Apple5)) {
pWritableExtns->vk_AMD_shader_image_load_store_lod.enabled = false;
pWritableExtns->vk_IMG_format_pvrtc.enabled = false;
}
#endif

View File

@ -49,7 +49,6 @@ static bool mvkIsSupportedOnPlatform(VkExtensionProperties* pProperties) {
#if MVK_MACOS
if (pProperties == &kVkExtProps_MVK_IOS_SURFACE) { return false; }
if (pProperties == &kVkExtProps_EXT_POST_DEPTH_COVERAGE) { return false; }
if (pProperties == &kVkExtProps_AMD_SHADER_IMAGE_LOAD_STORE_LOD) { return false; }
if (pProperties == &kVkExtProps_KHR_SHADER_SUBGROUP_EXTENDED_TYPES) { return mvkOSVersionIsAtLeast(10.14); }
if (pProperties == &kVkExtProps_EXT_HDR_METADATA) { return mvkOSVersionIsAtLeast(10.15); }
@ -57,6 +56,7 @@ static bool mvkIsSupportedOnPlatform(VkExtensionProperties* pProperties) {
if (pProperties == &kVkExtProps_EXT_MEMORY_BUDGET) { return mvkOSVersionIsAtLeast(10.13); }
if (pProperties == &kVkExtProps_EXT_SHADER_STENCIL_EXPORT) { return mvkOSVersionIsAtLeast(10.14); }
if (pProperties == &kVkExtProps_EXT_TEXEL_BUFFER_ALIGNMENT) { return mvkOSVersionIsAtLeast(10.13); }
if (pProperties == &kVkExtProps_AMD_SHADER_IMAGE_LOAD_STORE_LOD) { return mvkOSVersionIsAtLeast(10.16); }
if (pProperties == &kVkExtProps_AMD_SHADER_TRINARY_MINMAX) { return mvkOSVersionIsAtLeast(10.14); }
if (pProperties == &kVkExtProps_IMG_FORMAT_PVRTC) { return mvkOSVersionIsAtLeast(10.16); }
#endif