Skip to content

Commit 1518d0c

Browse files
authored
Merge pull request #370 from cdavis5e/shader-float16-int8
Support the VK_KHR_shader_float16_int8 extension.
2 parents b01fff1 + f4295ab commit 1518d0c

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

Docs/MoltenVK_Runtime_UserGuide.md

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ In addition to the core *Vulkan* API, **MoltenVK** also supports the following
235235
- `VK_KHR_relaxed_block_layout`
236236
- `VK_KHR_sampler_mirror_clamp_to_edge`
237237
- `VK_KHR_shader_draw_parameters`
238+
- `VK_KHR_shader_float16_int8`
238239
- `VK_KHR_storage_buffer_storage_class`
239240
- `VK_KHR_surface`
240241
- `VK_KHR_swapchain`
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
114c3546e195819bd53a34b39f5194b2989a5b12
1+
add65b83415824f59041486d4903ee1909dc6ee2

MoltenVK/MoltenVK/GPUObjects/MVKDevice.mm

+7
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@
8282
next = (VkStructureType*)storageFeatures->pNext;
8383
break;
8484
}
85+
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR: {
86+
auto* f16Features = (VkPhysicalDeviceFloat16Int8FeaturesKHR*)next;
87+
f16Features->shaderFloat16 = true;
88+
f16Features->shaderInt8 = false; // FIXME Needs SPIRV-Cross update
89+
next = (VkStructureType*)f16Features->pNext;
90+
break;
91+
}
8592
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT: {
8693
auto* divisorFeatures = (VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT*)next;
8794
divisorFeatures->vertexAttributeInstanceRateDivisor = true;

MoltenVK/MoltenVK/Layers/MVKExtensions.def

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ MVK_EXTENSION(KHR_push_descriptor, KHR_PUSH_DESCRIPTOR)
4444
MVK_EXTENSION(KHR_relaxed_block_layout, KHR_RELAXED_BLOCK_LAYOUT)
4545
MVK_EXTENSION(KHR_sampler_mirror_clamp_to_edge, KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE)
4646
MVK_EXTENSION(KHR_shader_draw_parameters, KHR_SHADER_DRAW_PARAMETERS)
47+
MVK_EXTENSION(KHR_shader_float16_int8, KHR_SHADER_FLOAT16_INT8)
4748
MVK_EXTENSION(KHR_storage_buffer_storage_class, KHR_STORAGE_BUFFER_STORAGE_CLASS)
4849
MVK_EXTENSION(KHR_surface, KHR_SURFACE)
4950
MVK_EXTENSION(KHR_swapchain, KHR_SWAPCHAIN)

0 commit comments

Comments
 (0)