winevulkan: Enable VK_AMD_memory_overallocation_behavior.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2019-04-10 11:59:51 +02:00 committed by Alexandre Julliard
parent df6b2381f8
commit abc83d1b34
3 changed files with 35 additions and 1 deletions

View File

@ -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",

View File

@ -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",

View File

@ -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;