diff --git a/Docs/MoltenVK_Runtime_UserGuide.md b/Docs/MoltenVK_Runtime_UserGuide.md index 74668126..cb276b06 100644 --- a/Docs/MoltenVK_Runtime_UserGuide.md +++ b/Docs/MoltenVK_Runtime_UserGuide.md @@ -221,17 +221,28 @@ in your source code files as follows: In addition to the core *Vulkan* API, **MoltenVK** also supports the following *Vulkan* extensions: +- `VK_KHR_16bit_storage` +- `VK_KHR_dedicated_allocation` +- `VK_KHR_descriptor_update_template` +- `VK_KHR_get_memory_requirements2` +- `VK_KHR_get_physical_device_properties2` +- `VK_KHR_image_format_list` +- `VK_KHR_maintenance1` +- `VK_KHR_maintenance2` +- `VK_KHR_maintenance3` +- `VK_KHR_push_descriptor` +- `VK_KHR_relaxed_block_layout` +- `VK_KHR_sampler_mirror_clamp_to_edge` +- `VK_KHR_shader_draw_parameters` +- `VK_KHR_storage_buffer_storage_class` +- `VK_KHR_surface` +- `VK_KHR_swapchain` +- `VK_EXT_shader_viewport_index_layer` +- `VK_EXT_vertex_attribute_divisor` - `VK_MVK_moltenvk` - `VK_MVK_macos_surface` (macOS) - `VK_MVK_ios_surface` (iOS) -- `VK_KHR_surface` -- `VK_KHR_swapchain` -- `vk_KHR_maintenance1` -- `vk_AMD_negative_viewport_height` -- `vk_KHR_shader_draw_parameters` -- `vk_KHR_get_physical_device_properties2` -- `vk_KHR_push_descriptor` -- `vk_KHR_descriptor_update_template` +- `VK_AMD_negative_viewport_height` - `VK_IMG_format_pvrtc` (iOS) In order to visibly display your content on *iOS* or *macOS*, you must enable the `VK_MVK_ios_surface` diff --git a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm index 7247dec8..20a99006 100644 --- a/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm +++ b/MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm @@ -65,6 +65,15 @@ void MVKPhysicalDevice::getFeatures(VkPhysicalDeviceFeatures2* features) { auto* next = (VkStructureType*)features->pNext; while (next) { switch (*next) { + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES: { + auto* storageFeatures = (VkPhysicalDevice16BitStorageFeatures*)next; + storageFeatures->storageBuffer16BitAccess = true; + storageFeatures->uniformAndStorageBuffer16BitAccess = true; + storageFeatures->storagePushConstant16 = true; + storageFeatures->storageInputOutput16 = true; + next = (VkStructureType*)storageFeatures->pNext; + break; + } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: { auto* divisorFeatures = (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*)next; divisorFeatures->vertexAttributeInstanceRateDivisor = true; diff --git a/MoltenVK/MoltenVK/Layers/MVKExtensions.def b/MoltenVK/MoltenVK/Layers/MVKExtensions.def index ccffcafe..6cb3b21d 100644 --- a/MoltenVK/MoltenVK/Layers/MVKExtensions.def +++ b/MoltenVK/MoltenVK/Layers/MVKExtensions.def @@ -30,6 +30,7 @@ #define MVK_EXTENSION_LAST(var, EXT) MVK_EXTENSION(var, EXT) #endif +MVK_EXTENSION(KHR_16bit_storage, KHR_16BIT_STORAGE) MVK_EXTENSION(KHR_dedicated_allocation, KHR_DEDICATED_ALLOCATION) MVK_EXTENSION(KHR_descriptor_update_template, KHR_DESCRIPTOR_UPDATE_TEMPLATE) MVK_EXTENSION(KHR_get_memory_requirements2, KHR_GET_MEMORY_REQUIREMENTS_2)