Commit 8bdfb41e authored by Derek Lesho's avatar Derek Lesho Committed by Alexandre Julliard

vulkan-1/tests: Add tests for VK_KHR_external_memory_win32.

parent 9a78f7d7
...@@ -99,7 +99,6 @@ UNSUPPORTED_EXTENSIONS = [ ...@@ -99,7 +99,6 @@ UNSUPPORTED_EXTENSIONS = [
"VK_EXT_pipeline_creation_feedback", "VK_EXT_pipeline_creation_feedback",
"VK_GOOGLE_display_timing", "VK_GOOGLE_display_timing",
"VK_KHR_external_fence_win32", "VK_KHR_external_fence_win32",
"VK_KHR_external_memory_win32",
"VK_KHR_external_semaphore_win32", "VK_KHR_external_semaphore_win32",
# Relates to external_semaphore and needs type conversions in bitflags. # Relates to external_semaphore and needs type conversions in bitflags.
"VK_KHR_shared_presentable_image", # Needs WSI work. "VK_KHR_shared_presentable_image", # Needs WSI work.
...@@ -125,7 +124,9 @@ UNSUPPORTED_EXTENSIONS = [ ...@@ -125,7 +124,9 @@ UNSUPPORTED_EXTENSIONS = [
# Either internal extensions which aren't present on the win32 platform which # Either internal extensions which aren't present on the win32 platform which
# winevulkan may nonetheless use, or extensions we want to generate headers for # winevulkan may nonetheless use, or extensions we want to generate headers for
# but not expose to applications (useful for test commits) # but not expose to applications (useful for test commits)
UNEXPOSED_EXTENSIONS = {} UNEXPOSED_EXTENSIONS = {
"VK_KHR_external_memory_win32",
}
# The Vulkan loader provides entry-points for core functionality and important # The Vulkan loader provides entry-points for core functionality and important
# extensions. Based on vulkan-1.def this amounts to WSI extensions on 1.0.51. # extensions. Based on vulkan-1.def this amounts to WSI extensions on 1.0.51.
......
...@@ -1838,6 +1838,18 @@ static inline void convert_VkImageViewHandleInfoNVX_win_to_host(const VkImageVie ...@@ -1838,6 +1838,18 @@ static inline void convert_VkImageViewHandleInfoNVX_win_to_host(const VkImageVie
#endif /* USE_STRUCT_CONVERSION */ #endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION) #if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkMemoryGetWin32HandleInfoKHR_win_to_host(const VkMemoryGetWin32HandleInfoKHR *in, VkMemoryGetWin32HandleInfoKHR_host *out)
{
if (!in) return;
out->sType = in->sType;
out->pNext = in->pNext;
out->memory = in->memory;
out->handleType = in->handleType;
}
#endif /* USE_STRUCT_CONVERSION */
#if defined(USE_STRUCT_CONVERSION)
static inline void convert_VkImageFormatProperties_host_to_win(const VkImageFormatProperties_host *in, VkImageFormatProperties *out) static inline void convert_VkImageFormatProperties_host_to_win(const VkImageFormatProperties_host *in, VkImageFormatProperties *out)
{ {
if (!in) return; if (!in) return;
......
...@@ -1248,6 +1248,18 @@ typedef VkImageViewHandleInfoNVX VkImageViewHandleInfoNVX_host; ...@@ -1248,6 +1248,18 @@ typedef VkImageViewHandleInfoNVX VkImageViewHandleInfoNVX_host;
#endif #endif
#if defined(USE_STRUCT_CONVERSION) #if defined(USE_STRUCT_CONVERSION)
typedef struct VkMemoryGetWin32HandleInfoKHR_host
{
VkStructureType sType;
const void *pNext;
VkDeviceMemory memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetWin32HandleInfoKHR_host;
#else
typedef VkMemoryGetWin32HandleInfoKHR VkMemoryGetWin32HandleInfoKHR_host;
#endif
#if defined(USE_STRUCT_CONVERSION)
typedef struct VkImageFormatProperties_host typedef struct VkImageFormatProperties_host
{ {
VkExtent3D maxExtent; VkExtent3D maxExtent;
...@@ -1994,6 +2006,8 @@ struct vulkan_device_funcs ...@@ -1994,6 +2006,8 @@ struct vulkan_device_funcs
VkResult (*p_vkGetImageViewAddressNVX)(VkDevice, VkImageView, VkImageViewAddressPropertiesNVX_host *); VkResult (*p_vkGetImageViewAddressNVX)(VkDevice, VkImageView, VkImageViewAddressPropertiesNVX_host *);
uint32_t (*p_vkGetImageViewHandleNVX)(VkDevice, const VkImageViewHandleInfoNVX_host *); uint32_t (*p_vkGetImageViewHandleNVX)(VkDevice, const VkImageViewHandleInfoNVX_host *);
VkResult (*p_vkGetMemoryHostPointerPropertiesEXT)(VkDevice, VkExternalMemoryHandleTypeFlagBits, const void *, VkMemoryHostPointerPropertiesEXT *); VkResult (*p_vkGetMemoryHostPointerPropertiesEXT)(VkDevice, VkExternalMemoryHandleTypeFlagBits, const void *, VkMemoryHostPointerPropertiesEXT *);
VkResult (*p_vkGetMemoryWin32HandleKHR)(VkDevice, const VkMemoryGetWin32HandleInfoKHR_host *, HANDLE *);
VkResult (*p_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice, VkExternalMemoryHandleTypeFlagBits, HANDLE, VkMemoryWin32HandlePropertiesKHR *);
VkResult (*p_vkGetPerformanceParameterINTEL)(VkDevice, VkPerformanceParameterTypeINTEL, VkPerformanceValueINTEL *); VkResult (*p_vkGetPerformanceParameterINTEL)(VkDevice, VkPerformanceParameterTypeINTEL, VkPerformanceValueINTEL *);
VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *); VkResult (*p_vkGetPipelineCacheData)(VkDevice, VkPipelineCache, size_t *, void *);
VkResult (*p_vkGetPipelineExecutableInternalRepresentationsKHR)(VkDevice, const VkPipelineExecutableInfoKHR_host *, uint32_t *, VkPipelineExecutableInternalRepresentationKHR *); VkResult (*p_vkGetPipelineExecutableInternalRepresentationsKHR)(VkDevice, const VkPipelineExecutableInfoKHR_host *, uint32_t *, VkPipelineExecutableInternalRepresentationKHR *);
...@@ -2397,6 +2411,8 @@ struct vulkan_instance_funcs ...@@ -2397,6 +2411,8 @@ struct vulkan_instance_funcs
USE_VK_FUNC(vkGetImageViewAddressNVX) \ USE_VK_FUNC(vkGetImageViewAddressNVX) \
USE_VK_FUNC(vkGetImageViewHandleNVX) \ USE_VK_FUNC(vkGetImageViewHandleNVX) \
USE_VK_FUNC(vkGetMemoryHostPointerPropertiesEXT) \ USE_VK_FUNC(vkGetMemoryHostPointerPropertiesEXT) \
USE_VK_FUNC(vkGetMemoryWin32HandleKHR) \
USE_VK_FUNC(vkGetMemoryWin32HandlePropertiesKHR) \
USE_VK_FUNC(vkGetPerformanceParameterINTEL) \ USE_VK_FUNC(vkGetPerformanceParameterINTEL) \
USE_VK_FUNC(vkGetPipelineCacheData) \ USE_VK_FUNC(vkGetPipelineCacheData) \
USE_VK_FUNC(vkGetPipelineExecutableInternalRepresentationsKHR) \ USE_VK_FUNC(vkGetPipelineExecutableInternalRepresentationsKHR) \
......
...@@ -140,6 +140,8 @@ ...@@ -140,6 +140,8 @@
#define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities" #define VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_memory_capabilities"
#define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory" #define VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME "VK_KHR_external_memory"
#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION 1
#define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities" #define VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME "VK_KHR_external_semaphore_capabilities"
#define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1 #define VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION 1
...@@ -3102,6 +3104,10 @@ typedef enum VkStructureType ...@@ -3102,6 +3104,10 @@ typedef enum VkStructureType
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO = 1000072000,
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO = 1000072001,
VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO = 1000072002,
VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073000,
VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR = 1000073001,
VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR = 1000073002,
VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR = 1000073003,
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO = 1000076000,
VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001, VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES = 1000076001,
VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000, VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO = 1000077000,
...@@ -4234,6 +4240,15 @@ typedef struct VkExportFenceCreateInfo ...@@ -4234,6 +4240,15 @@ typedef struct VkExportFenceCreateInfo
} VkExportFenceCreateInfo; } VkExportFenceCreateInfo;
typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR; typedef VkExportFenceCreateInfo VkExportFenceCreateInfoKHR;
typedef struct VkExportMemoryWin32HandleInfoKHR
{
VkStructureType sType;
const void *pNext;
const SECURITY_ATTRIBUTES *pAttributes;
DWORD dwAccess;
LPCWSTR name;
} VkExportMemoryWin32HandleInfoKHR;
typedef struct VkExportSemaphoreCreateInfo typedef struct VkExportSemaphoreCreateInfo
{ {
VkStructureType sType; VkStructureType sType;
...@@ -4479,6 +4494,14 @@ typedef struct VkMemoryDedicatedRequirements ...@@ -4479,6 +4494,14 @@ typedef struct VkMemoryDedicatedRequirements
} VkMemoryDedicatedRequirements; } VkMemoryDedicatedRequirements;
typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR; typedef VkMemoryDedicatedRequirements VkMemoryDedicatedRequirementsKHR;
typedef struct VkMemoryGetWin32HandleInfoKHR
{
VkStructureType sType;
const void *pNext;
VkDeviceMemory WINE_VK_ALIGN(8) memory;
VkExternalMemoryHandleTypeFlagBits handleType;
} VkMemoryGetWin32HandleInfoKHR;
typedef struct VkMemoryHeap typedef struct VkMemoryHeap
{ {
VkDeviceSize WINE_VK_ALIGN(8) size; VkDeviceSize WINE_VK_ALIGN(8) size;
...@@ -6307,6 +6330,13 @@ typedef struct VkMemoryAllocateInfo ...@@ -6307,6 +6330,13 @@ typedef struct VkMemoryAllocateInfo
uint32_t memoryTypeIndex; uint32_t memoryTypeIndex;
} VkMemoryAllocateInfo; } VkMemoryAllocateInfo;
typedef struct VkMemoryWin32HandlePropertiesKHR
{
VkStructureType sType;
void *pNext;
uint32_t memoryTypeBits;
} VkMemoryWin32HandlePropertiesKHR;
typedef struct VkMultiDrawInfoEXT typedef struct VkMultiDrawInfoEXT
{ {
uint32_t firstVertex; uint32_t firstVertex;
...@@ -7389,6 +7419,15 @@ typedef struct VkImageViewHandleInfoNVX ...@@ -7389,6 +7419,15 @@ typedef struct VkImageViewHandleInfoNVX
VkSampler WINE_VK_ALIGN(8) sampler; VkSampler WINE_VK_ALIGN(8) sampler;
} VkImageViewHandleInfoNVX; } VkImageViewHandleInfoNVX;
typedef struct VkImportMemoryWin32HandleInfoKHR
{
VkStructureType sType;
const void *pNext;
VkExternalMemoryHandleTypeFlagBits handleType;
HANDLE handle;
LPCWSTR name;
} VkImportMemoryWin32HandleInfoKHR;
typedef struct VkIndirectCommandsStreamNV typedef struct VkIndirectCommandsStreamNV
{ {
VkBuffer WINE_VK_ALIGN(8) buffer; VkBuffer WINE_VK_ALIGN(8) buffer;
...@@ -9371,6 +9410,8 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetImageViewAddressNVX)(VkDevice, VkImageView ...@@ -9371,6 +9410,8 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetImageViewAddressNVX)(VkDevice, VkImageView
typedef uint32_t (VKAPI_PTR *PFN_vkGetImageViewHandleNVX)(VkDevice, const VkImageViewHandleInfoNVX *); typedef uint32_t (VKAPI_PTR *PFN_vkGetImageViewHandleNVX)(VkDevice, const VkImageViewHandleInfoNVX *);
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 VkResult (VKAPI_PTR *PFN_vkGetMemoryHostPointerPropertiesEXT)(VkDevice, VkExternalMemoryHandleTypeFlagBits, const void *, VkMemoryHostPointerPropertiesEXT *);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice, const VkMemoryGetWin32HandleInfoKHR *, HANDLE *);
typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice, VkExternalMemoryHandleTypeFlagBits, HANDLE, VkMemoryWin32HandlePropertiesKHR *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPerformanceParameterINTEL)(VkDevice, VkPerformanceParameterTypeINTEL, VkPerformanceValueINTEL *); typedef VkResult (VKAPI_PTR *PFN_vkGetPerformanceParameterINTEL)(VkDevice, VkPerformanceParameterTypeINTEL, VkPerformanceValueINTEL *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice, uint32_t *, VkTimeDomainEXT *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCalibrateableTimeDomainsEXT)(VkPhysicalDevice, uint32_t *, VkTimeDomainEXT *);
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)(VkPhysicalDevice, uint32_t *, VkCooperativeMatrixPropertiesNV *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceCooperativeMatrixPropertiesNV)(VkPhysicalDevice, uint32_t *, VkCooperativeMatrixPropertiesNV *);
...@@ -9781,6 +9822,8 @@ VkResult VKAPI_CALL vkGetImageViewAddressNVX(VkDevice device, VkImageView imageV ...@@ -9781,6 +9822,8 @@ VkResult VKAPI_CALL vkGetImageViewAddressNVX(VkDevice device, VkImageView imageV
uint32_t VKAPI_CALL vkGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX *pInfo); uint32_t VKAPI_CALL vkGetImageViewHandleNVX(VkDevice device, const VkImageViewHandleInfoNVX *pInfo);
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); VkResult VKAPI_CALL vkGetMemoryHostPointerPropertiesEXT(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, const void *pHostPointer, VkMemoryHostPointerPropertiesEXT *pMemoryHostPointerProperties);
VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(VkDevice device, const VkMemoryGetWin32HandleInfoKHR *pGetWin32HandleInfo, HANDLE *pHandle);
VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR *pMemoryWin32HandleProperties);
VkResult VKAPI_CALL vkGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL *pValue); VkResult VKAPI_CALL vkGetPerformanceParameterINTEL(VkDevice device, VkPerformanceParameterTypeINTEL parameter, VkPerformanceValueINTEL *pValue);
VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t *pTimeDomainCount, VkTimeDomainEXT *pTimeDomains); VkResult VKAPI_CALL vkGetPhysicalDeviceCalibrateableTimeDomainsEXT(VkPhysicalDevice physicalDevice, uint32_t *pTimeDomainCount, VkTimeDomainEXT *pTimeDomains);
VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkCooperativeMatrixPropertiesNV *pProperties); VkResult VKAPI_CALL vkGetPhysicalDeviceCooperativeMatrixPropertiesNV(VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, VkCooperativeMatrixPropertiesNV *pProperties);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment