winevulkan: Enable VK_EXT_external_memory_host.

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:53 +02:00 committed by Alexandre Julliard
parent 4b269f0293
commit 59b5394eef
4 changed files with 41 additions and 1 deletions

View File

@ -102,7 +102,6 @@ BLACKLISTED_EXTENSIONS = [
"VK_AMD_display_native_hdr", "VK_AMD_display_native_hdr",
"VK_EXT_calibrated_timestamps", "VK_EXT_calibrated_timestamps",
"VK_EXT_display_control", # Requires VK_EXT_display_surface_counter "VK_EXT_display_control", # Requires VK_EXT_display_surface_counter
"VK_EXT_external_memory_host",
"VK_EXT_full_screen_exclusive", "VK_EXT_full_screen_exclusive",
"VK_EXT_hdr_metadata", # Needs WSI work. "VK_EXT_hdr_metadata", # Needs WSI work.
"VK_EXT_pipeline_creation_feedback", "VK_EXT_pipeline_creation_feedback",

View File

@ -3495,6 +3495,12 @@ void WINAPI wine_vkGetImageSubresourceLayout(VkDevice device, VkImage image, con
#endif #endif
} }
static VkResult WINAPI wine_vkGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void *pHostPointer, VkMemoryHostPointerPropertiesEXT *pMemoryHostPointerProperties)
{
TRACE("%p, %#x, %p, %p\n", device, handleType, pHostPointer, pMemoryHostPointerProperties);
return device->funcs.p_vkGetMemoryHostPointerPropertiesEXT(device->device, handleType, pHostPointer, pMemoryHostPointerProperties);
}
void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures) void WINAPI wine_vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures *pFeatures)
{ {
TRACE("%p, %p\n", physicalDevice, pFeatures); TRACE("%p, %p\n", physicalDevice, pFeatures);
@ -4143,6 +4149,7 @@ static const struct vulkan_func vk_device_dispatch_table[] =
{"vkGetImageSparseMemoryRequirements2", &wine_vkGetImageSparseMemoryRequirements2}, {"vkGetImageSparseMemoryRequirements2", &wine_vkGetImageSparseMemoryRequirements2},
{"vkGetImageSparseMemoryRequirements2KHR", &wine_vkGetImageSparseMemoryRequirements2KHR}, {"vkGetImageSparseMemoryRequirements2KHR", &wine_vkGetImageSparseMemoryRequirements2KHR},
{"vkGetImageSubresourceLayout", &wine_vkGetImageSubresourceLayout}, {"vkGetImageSubresourceLayout", &wine_vkGetImageSubresourceLayout},
{"vkGetMemoryHostPointerPropertiesEXT", &wine_vkGetMemoryHostPointerPropertiesEXT},
{"vkGetPipelineCacheData", &wine_vkGetPipelineCacheData}, {"vkGetPipelineCacheData", &wine_vkGetPipelineCacheData},
{"vkGetQueryPoolResults", &wine_vkGetQueryPoolResults}, {"vkGetQueryPoolResults", &wine_vkGetQueryPoolResults},
{"vkGetQueueCheckpointDataNV", &wine_vkGetQueueCheckpointDataNV}, {"vkGetQueueCheckpointDataNV", &wine_vkGetQueueCheckpointDataNV},
@ -4278,6 +4285,7 @@ static const char * const vk_device_extensions[] =
"VK_EXT_depth_range_unrestricted", "VK_EXT_depth_range_unrestricted",
"VK_EXT_descriptor_indexing", "VK_EXT_descriptor_indexing",
"VK_EXT_discard_rectangles", "VK_EXT_discard_rectangles",
"VK_EXT_external_memory_host",
"VK_EXT_filter_cubic", "VK_EXT_filter_cubic",
"VK_EXT_fragment_density_map", "VK_EXT_fragment_density_map",
"VK_EXT_global_priority", "VK_EXT_global_priority",

View File

@ -1124,6 +1124,7 @@ struct vulkan_device_funcs
#else #else
void (*p_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout *); void (*p_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout *);
#endif #endif
VkResult (*p_vkGetMemoryHostPointerPropertiesEXT)(VkDevice, VkExternalMemoryHandleTypeFlagBits, const void *, VkMemoryHostPointerPropertiesEXT *);
VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *); VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *);
VkResult (*p_vkGetQueryPoolResults)(VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *, VkDeviceSize, VkQueryResultFlags); VkResult (*p_vkGetQueryPoolResults)(VkDevice, VkQueryPool, uint32_t, uint32_t, size_t, void *, VkDeviceSize, VkQueryResultFlags);
void (*p_vkGetQueueCheckpointDataNV)(VkQueue, uint32_t *, VkCheckpointDataNV *); void (*p_vkGetQueueCheckpointDataNV)(VkQueue, uint32_t *, VkCheckpointDataNV *);
@ -1425,6 +1426,7 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkGetImageSparseMemoryRequirements2) \ USE_VK_FUNC(vkGetImageSparseMemoryRequirements2) \
USE_VK_FUNC(vkGetImageSparseMemoryRequirements2KHR) \ USE_VK_FUNC(vkGetImageSparseMemoryRequirements2KHR) \
USE_VK_FUNC(vkGetImageSubresourceLayout) \ USE_VK_FUNC(vkGetImageSubresourceLayout) \
USE_VK_FUNC(vkGetMemoryHostPointerPropertiesEXT) \
USE_VK_FUNC(vkGetPipelineCacheData) \ USE_VK_FUNC(vkGetPipelineCacheData) \
USE_VK_FUNC(vkGetQueryPoolResults) \ USE_VK_FUNC(vkGetQueryPoolResults) \
USE_VK_FUNC(vkGetQueueCheckpointDataNV) \ USE_VK_FUNC(vkGetQueueCheckpointDataNV) \

View File

@ -254,6 +254,8 @@
#define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority" #define VK_EXT_GLOBAL_PRIORITY_EXTENSION_NAME "VK_EXT_global_priority"
#define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_8BIT_STORAGE_SPEC_VERSION 1
#define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage" #define VK_KHR_8BIT_STORAGE_EXTENSION_NAME "VK_KHR_8bit_storage"
#define VK_EXT_EXTERNAL_MEMORY_HOST_SPEC_VERSION 1
#define VK_EXT_EXTERNAL_MEMORY_HOST_EXTENSION_NAME "VK_EXT_external_memory_host"
#define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1 #define VK_AMD_BUFFER_MARKER_SPEC_VERSION 1
#define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker" #define VK_AMD_BUFFER_MARKER_EXTENSION_NAME "VK_AMD_buffer_marker"
#define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1 #define VK_KHR_SHADER_ATOMIC_INT64_SPEC_VERSION 1
@ -970,6 +972,8 @@ typedef enum VkExternalMemoryHandleTypeFlagBits
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D11_TEXTURE_KMT_BIT = 0x00000010,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_HEAP_BIT = 0x00000020,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040, VK_EXTERNAL_MEMORY_HANDLE_TYPE_D3D12_RESOURCE_BIT = 0x00000040,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_ALLOCATION_BIT_EXT = 0x00000080,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_HOST_MAPPED_FOREIGN_MEMORY_BIT_EXT = 0x00000100,
VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7fffffff, VK_EXTERNAL_MEMORY_HANDLE_TYPE_FLAG_BITS_MAX_ENUM = 0x7fffffff,
} VkExternalMemoryHandleTypeFlagBits; } VkExternalMemoryHandleTypeFlagBits;
@ -2077,6 +2081,9 @@ typedef enum VkStructureType
VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001, VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT = 1000170001,
VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000, VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT = 1000174000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR = 1000177000,
VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT = 1000178000,
VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT = 1000178001,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT = 1000178002,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR = 1000180000,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD = 1000185000,
VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000, VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD = 1000189000,
@ -2637,6 +2644,13 @@ typedef struct VkMemoryBarrier
VkAccessFlags dstAccessMask; VkAccessFlags dstAccessMask;
} VkMemoryBarrier; } VkMemoryBarrier;
typedef struct VkMemoryHostPointerPropertiesEXT
{
VkStructureType sType;
void *pNext;
uint32_t memoryTypeBits;
} VkMemoryHostPointerPropertiesEXT;
typedef struct VkMemoryRequirements typedef struct VkMemoryRequirements
{ {
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
@ -4258,6 +4272,13 @@ typedef struct VkPhysicalDeviceDriverPropertiesKHR
VkConformanceVersionKHR conformanceVersion; VkConformanceVersionKHR conformanceVersion;
} VkPhysicalDeviceDriverPropertiesKHR; } VkPhysicalDeviceDriverPropertiesKHR;
typedef struct VkPhysicalDeviceExternalMemoryHostPropertiesEXT
{
VkStructureType sType;
void *pNext;
VkDeviceSize WINE_VK_ALIGN(8) minImportedHostPointerAlignment;
} VkPhysicalDeviceExternalMemoryHostPropertiesEXT;
typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT typedef struct VkPhysicalDeviceFragmentDensityMapFeaturesEXT
{ {
VkStructureType sType; VkStructureType sType;
@ -4867,6 +4888,14 @@ typedef struct VkImageFormatProperties2
VkImageFormatProperties WINE_VK_ALIGN(8) imageFormatProperties; VkImageFormatProperties WINE_VK_ALIGN(8) imageFormatProperties;
} VkImageFormatProperties2; } VkImageFormatProperties2;
typedef struct VkImportMemoryHostPointerInfoEXT
{
VkStructureType sType;
const void *pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
void *pHostPointer;
} VkImportMemoryHostPointerInfoEXT;
typedef struct VkMemoryHeap typedef struct VkMemoryHeap
{ {
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
@ -5442,6 +5471,7 @@ typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2)(VkDevice, cons
typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice, const VkImageSparseMemoryRequirementsInfo2 *, uint32_t *, VkSparseImageMemoryRequirements2 *); typedef void (VKAPI_PTR *PFN_vkGetImageSparseMemoryRequirements2KHR)(VkDevice, const VkImageSparseMemoryRequirementsInfo2 *, uint32_t *, VkSparseImageMemoryRequirements2 *);
typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout *); typedef void (VKAPI_PTR *PFN_vkGetImageSubresourceLayout)(VkDevice, VkImage, const VkImageSubresource *, VkSubresourceLayout *);
typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance, const char *); typedef PFN_vkVoidFunction (VKAPI_PTR *PFN_vkGetInstanceProcAddr)(VkInstance, const char *);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice, VkExternalMemoryHandleTypeFlagBits, const void *, VkMemoryHostPointerPropertiesEXT *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice, const VkPhysicalDeviceExternalBufferInfo *, VkExternalBufferProperties *); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferProperties)(VkPhysicalDevice, const VkPhysicalDeviceExternalBufferInfo *, VkExternalBufferProperties *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice, const VkPhysicalDeviceExternalBufferInfo *, VkExternalBufferProperties *); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR)(VkPhysicalDevice, const VkPhysicalDeviceExternalBufferInfo *, VkExternalBufferProperties *);
typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice, const VkPhysicalDeviceExternalFenceInfo *, VkExternalFenceProperties *); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceExternalFenceProperties)(VkPhysicalDevice, const VkPhysicalDeviceExternalFenceInfo *, VkExternalFenceProperties *);
@ -5702,6 +5732,7 @@ void VKAPI_CALL vkGetImageSparseMemoryRequirements2(VkDevice device, const VkIma
void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2 *pInfo, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements); void VKAPI_CALL vkGetImageSparseMemoryRequirements2KHR(VkDevice device, const VkImageSparseMemoryRequirementsInfo2 *pInfo, uint32_t *pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements2 *pSparseMemoryRequirements);
void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout); void VKAPI_CALL vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource *pSubresource, VkSubresourceLayout *pLayout);
PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName); PFN_vkVoidFunction VKAPI_CALL vkGetInstanceProcAddr(VkInstance instance, const char *pName);
VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void *pHostPointer, VkMemoryHostPointerPropertiesEXT *pMemoryHostPointerProperties);
void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties); void VKAPI_CALL vkGetPhysicalDeviceExternalBufferProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties);
void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties); void VKAPI_CALL vkGetPhysicalDeviceExternalBufferPropertiesKHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfo *pExternalBufferInfo, VkExternalBufferProperties *pExternalBufferProperties);
void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties); void VKAPI_CALL vkGetPhysicalDeviceExternalFenceProperties(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalFenceInfo *pExternalFenceInfo, VkExternalFenceProperties *pExternalFenceProperties);