From abc83d1b3447e731f01f144d88c5d919efcab8ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Wed, 10 Apr 2019 11:59:51 +0200 Subject: [PATCH] winevulkan: Enable VK_AMD_memory_overallocation_behavior. 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 | 17 +++++++++++++++++ include/wine/vulkan.h | 18 ++++++++++++++++++ 3 files changed, 35 insertions(+), 1 deletion(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index af376576268..46294f7054b 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -101,7 +101,6 @@ BLACKLISTED_EXTENSIONS = [ # Device extensions "VK_AMD_display_native_hdr", "VK_EXT_calibrated_timestamps", - "VK_AMD_memory_overallocation_behavior", "VK_EXT_display_control", # Requires VK_EXT_display_surface_counter "VK_EXT_external_memory_host", "VK_EXT_full_screen_exclusive", diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index fc41fb00e33..9919642fa92 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -1828,6 +1828,22 @@ VkResult convert_VkDeviceCreateInfo_struct_chain(const void *pNext, VkDeviceCrea break; } + case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: + { + const VkDeviceMemoryOverallocationCreateInfoAMD *in = (const VkDeviceMemoryOverallocationCreateInfoAMD *)in_header; + VkDeviceMemoryOverallocationCreateInfoAMD *out; + + if (!(out = heap_alloc(sizeof(*out)))) goto out_of_memory; + + out->sType = in->sType; + out->pNext = NULL; + out->overallocationBehavior = in->overallocationBehavior; + + out_header->pNext = (VkBaseOutStructure *)out; + out_header = out_header->pNext; + break; + } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_DENSITY_MAP_FEATURES_EXT: { const VkPhysicalDeviceFragmentDensityMapFeaturesEXT *in = (const VkPhysicalDeviceFragmentDensityMapFeaturesEXT *)in_header; @@ -4225,6 +4241,7 @@ static const char * const vk_device_extensions[] = "VK_AMD_gcn_shader", "VK_AMD_gpu_shader_half_float", "VK_AMD_gpu_shader_int16", + "VK_AMD_memory_overallocation_behavior", "VK_AMD_mixed_attachment_samples", "VK_AMD_negative_viewport_height", "VK_AMD_rasterization_order", diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index 2a86277fe20..5a48441c38b 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -260,6 +260,8 @@ #define VK_KHR_SHADER_ATOMIC_INT64_EXTENSION_NAME "VK_KHR_shader_atomic_int64" #define VK_AMD_SHADER_CORE_PROPERTIES_SPEC_VERSION 1 #define VK_AMD_SHADER_CORE_PROPERTIES_EXTENSION_NAME "VK_AMD_shader_core_properties" +#define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_SPEC_VERSION 1 +#define VK_AMD_MEMORY_OVERALLOCATION_BEHAVIOR_EXTENSION_NAME "VK_AMD_memory_overallocation_behavior" #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION 3 #define VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME "VK_EXT_vertex_attribute_divisor" #define VK_KHR_DRIVER_PROPERTIES_SPEC_VERSION 1 @@ -1445,6 +1447,14 @@ typedef enum VkMemoryHeapFlagBits VK_MEMORY_HEAP_FLAG_BITS_MAX_ENUM = 0x7fffffff, } VkMemoryHeapFlagBits; +typedef enum VkMemoryOverallocationBehaviorAMD +{ + VK_MEMORY_OVERALLOCATION_BEHAVIOR_DEFAULT_AMD = 0, + VK_MEMORY_OVERALLOCATION_BEHAVIOR_ALLOWED_AMD = 1, + VK_MEMORY_OVERALLOCATION_BEHAVIOR_DISALLOWED_AMD = 2, + VK_MEMORY_OVERALLOCATION_BEHAVIOR_AMD_MAX_ENUM = 0x7fffffff, +} VkMemoryOverallocationBehaviorAMD; + typedef enum VkMemoryPropertyFlagBits { VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT = 0x00000001, @@ -2067,6 +2077,7 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, + VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002, @@ -2429,6 +2440,13 @@ typedef struct VkDeviceGroupPresentInfoKHR VkDeviceGroupPresentModeFlagBitsKHR mode; } VkDeviceGroupPresentInfoKHR; +typedef struct VkDeviceMemoryOverallocationCreateInfoAMD +{ + VkStructureType sType; + const void *pNext; + VkMemoryOverallocationBehaviorAMD overallocationBehavior; +} VkDeviceMemoryOverallocationCreateInfoAMD; + typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT { VkStructureType sType;