Merge pull request #367 from cdavis5e/16-bit-storage
Support the VK_KHR_16bit_storage extension.
This commit is contained in:
commit
5a93d80de0
@ -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:
|
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_moltenvk`
|
||||||
- `VK_MVK_macos_surface` (macOS)
|
- `VK_MVK_macos_surface` (macOS)
|
||||||
- `VK_MVK_ios_surface` (iOS)
|
- `VK_MVK_ios_surface` (iOS)
|
||||||
- `VK_KHR_surface`
|
- `VK_AMD_negative_viewport_height`
|
||||||
- `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_IMG_format_pvrtc` (iOS)
|
- `VK_IMG_format_pvrtc` (iOS)
|
||||||
|
|
||||||
In order to visibly display your content on *iOS* or *macOS*, you must enable the `VK_MVK_ios_surface`
|
In order to visibly display your content on *iOS* or *macOS*, you must enable the `VK_MVK_ios_surface`
|
||||||
|
@ -65,6 +65,15 @@ void MVKPhysicalDevice::getFeatures(VkPhysicalDeviceFeatures2* features) {
|
|||||||
auto* next = (VkStructureType*)features->pNext;
|
auto* next = (VkStructureType*)features->pNext;
|
||||||
while (next) {
|
while (next) {
|
||||||
switch (*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: {
|
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: {
|
||||||
auto* divisorFeatures = (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*)next;
|
auto* divisorFeatures = (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*)next;
|
||||||
divisorFeatures->vertexAttributeInstanceRateDivisor = true;
|
divisorFeatures->vertexAttributeInstanceRateDivisor = true;
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
#define MVK_EXTENSION_LAST(var, EXT) MVK_EXTENSION(var, EXT)
|
#define MVK_EXTENSION_LAST(var, EXT) MVK_EXTENSION(var, EXT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
MVK_EXTENSION(KHR_16bit_storage, KHR_16BIT_STORAGE)
|
||||||
MVK_EXTENSION(KHR_dedicated_allocation, KHR_DEDICATED_ALLOCATION)
|
MVK_EXTENSION(KHR_dedicated_allocation, KHR_DEDICATED_ALLOCATION)
|
||||||
MVK_EXTENSION(KHR_descriptor_update_template, KHR_DESCRIPTOR_UPDATE_TEMPLATE)
|
MVK_EXTENSION(KHR_descriptor_update_template, KHR_DESCRIPTOR_UPDATE_TEMPLATE)
|
||||||
MVK_EXTENSION(KHR_get_memory_requirements2, KHR_GET_MEMORY_REQUIREMENTS_2)
|
MVK_EXTENSION(KHR_get_memory_requirements2, KHR_GET_MEMORY_REQUIREMENTS_2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user