From bbfc4f6f0d0a3a94508444e3b11f1edb8260b3fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 10 Apr 2019 11:59:54 +0200 Subject: [PATCH] winevulkan: Enable VK_KHR_shader_float16_int8. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Józef Kucia Signed-off-by: Alexandre Julliard --- dlls/winevulkan/make_vulkan | 1 - dlls/winevulkan/vulkan_thunks.c | 18 ++++++++++++++++++ include/wine/vulkan.h | 11 +++++++++++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index be3996c3792..851c554e3df 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -110,7 +110,6 @@ BLACKLISTED_EXTENSIONS = [ "VK_KHR_external_fence_win32", "VK_KHR_external_memory_win32", "VK_KHR_external_semaphore_win32", - "VK_KHR_shader_float16_int8", # Relates to external_semaphore and needs type conversions in bitflags. "VK_KHR_shared_presentable_image", # Needs WSI work. "VK_KHR_win32_keyed_mutex", diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index e80bb7c022a..87944657ade 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -1526,6 +1526,23 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR: + { + const VkPhysicalDeviceFloat16Int8FeaturesKHR *in = (const VkPhysicalDeviceFloat16Int8FeaturesKHR *)in_header; + VkPhysicalDeviceFloat16Int8FeaturesKHR *out; + + if (!(out = heap_alloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->shaderFloat16 = in->shaderFloat16; + out->shaderInt8 = in->shaderInt8; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_HOST_QUERY_RESET_FEATURES_EXT: { const VkPhysicalDeviceHostQueryResetFeaturesEXT *in = (const VkPhysicalDeviceHostQueryResetFeaturesEXT *)in_header; @@ -4337,6 +4354,7 @@ static const char * const vk_device_extensions[] = "VK_KHR_sampler_ycbcr_conversion", "VK_KHR_shader_atomic_int64", "VK_KHR_shader_draw_parameters", + "VK_KHR_shader_float16_int8", "VK_KHR_shader_float_controls", "VK_KHR_storage_buffer_storage_class", "VK_KHR_swapchain", diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index 3a80b88bbfe..ecdabe40714 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -158,6 +158,8 @@ #define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" #define VK_EXT_CONDITIONAL_RENDERING_SPEC_VERSION 1 #define VK_EXT_CONDITIONAL_RENDERING_EXTENSION_NAME "VK_EXT_conditional_rendering" +#define VK_KHR_SHADER_FLOAT16_INT8_SPEC_VERSION 1 +#define VK_KHR_SHADER_FLOAT16_INT8_EXTENSION_NAME "VK_KHR_shader_float16_int8" #define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage" #define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 @@ -1988,6 +1990,7 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT = 1000081000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT = 1000081001, VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT = 1000081002, + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT16_INT8_FEATURES_KHR = 1000082000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES = 1000083000, VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR = 1000084000, VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO = 1000085000, @@ -3752,6 +3755,14 @@ typedef struct VkPhysicalDeviceExternalImageFormatInfo VkExternalMemoryHandleTypeFlagBits handleType; } VkPhysicalDeviceExternalImageFormatInfo; +typedef struct VkPhysicalDeviceFloat16Int8FeaturesKHR +{ + VkStructureType sType; + void *pNext; + VkBool32 shaderFloat16; + VkBool32 shaderInt8; +} VkPhysicalDeviceFloat16Int8FeaturesKHR; + typedef struct VkPhysicalDeviceGroupProperties { VkStructureType sType;