Update to vulkan.h 1.0.55

* Drop support for now deprecated KHX sharing extensions:
  - VK_KHX_external_memory
  - VK_KHX_external_memory_capabilities
  - VK_KHX_external_memory_win32
  - VK_KHX_external_memory_fd
  - VK_KHX_external_semaphore
  - VK_KHX_external_semaphore_capabilities
  - VK_KHX_external_semaphore_win32
  - VK_KHX_external_semaphore_fd
  - VK_KHX_win32_keyed_mutex
* And add support for the KHR promoted versions (which are almost the
  same, with some minor changes).
This commit is contained in:
baldurk
2017-07-21 18:52:14 +01:00
parent af896d55e6
commit 001b6b4e92
15 changed files with 1541 additions and 716 deletions
+10 -1
View File
@@ -68,7 +68,7 @@ typedef struct VkNegotiateLayerInterface {
typedef VkResult (VKAPI_PTR *PFN_vkNegotiateLoaderLayerInterfaceVersion)(VkNegotiateLayerInterface *pVersionStruct);
// Function prototype for unknown physical device extension command
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device, ...);
typedef VkResult(VKAPI_PTR *PFN_PhysDevExt)(VkPhysicalDevice phys_device);
// ------------------------------------------------------------------------------------------------
// CreateInstance and CreateDevice support structures
@@ -132,3 +132,12 @@ typedef struct {
} u;
} VkLayerDeviceCreateInfo;
#ifdef __cplusplus
extern "C" {
#endif
VKAPI_ATTR VkResult VKAPI_CALL vkNegotiateLoaderLayerInterfaceVersion(VkNegotiateLayerInterface *pVersionStruct);
#ifdef __cplusplus
}
#endif
@@ -119,6 +119,19 @@ typedef struct VkLayerInstanceDispatchTable_ {
PFN_vkGetPhysicalDeviceMemoryProperties2KHR GetPhysicalDeviceMemoryProperties2KHR;
PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR GetPhysicalDeviceSparseImageFormatProperties2KHR;
// ---- VK_KHR_external_memory_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHR GetPhysicalDeviceExternalBufferPropertiesKHR;
// ---- VK_KHR_external_semaphore_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHR GetPhysicalDeviceExternalSemaphorePropertiesKHR;
// ---- VK_KHR_external_fence_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalFencePropertiesKHR GetPhysicalDeviceExternalFencePropertiesKHR;
// ---- VK_KHR_get_surface_capabilities2 extension commands
PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR GetPhysicalDeviceSurfaceCapabilities2KHR;
PFN_vkGetPhysicalDeviceSurfaceFormats2KHR GetPhysicalDeviceSurfaceFormats2KHR;
// ---- VK_EXT_debug_report extension commands
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
@@ -138,14 +151,6 @@ typedef struct VkLayerInstanceDispatchTable_ {
// ---- VK_KHX_device_group_creation extension commands
PFN_vkEnumeratePhysicalDeviceGroupsKHX EnumeratePhysicalDeviceGroupsKHX;
// ---- VK_KHX_external_memory_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalBufferPropertiesKHX GetPhysicalDeviceExternalBufferPropertiesKHX;
PFN_vkGetPhysicalDeviceProperties2KHX GetPhysicalDeviceProperties2KHX;
PFN_vkGetPhysicalDeviceImageFormatProperties2KHX GetPhysicalDeviceImageFormatProperties2KHX;
// ---- VK_KHX_external_semaphore_capabilities extension commands
PFN_vkGetPhysicalDeviceExternalSemaphorePropertiesKHX GetPhysicalDeviceExternalSemaphorePropertiesKHX;
// ---- VK_NVX_device_generated_commands extension commands
PFN_vkGetPhysicalDeviceGeneratedCommandsPropertiesNVX GetPhysicalDeviceGeneratedCommandsPropertiesNVX;
@@ -313,6 +318,30 @@ typedef struct VkLayerDispatchTable_ {
// ---- VK_KHR_maintenance1 extension commands
PFN_vkTrimCommandPoolKHR TrimCommandPoolKHR;
// ---- VK_KHR_external_memory_win32 extension commands
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkGetMemoryWin32HandleKHR GetMemoryWin32HandleKHR;
#endif // VK_USE_PLATFORM_WIN32_KHR
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkGetMemoryWin32HandlePropertiesKHR GetMemoryWin32HandlePropertiesKHR;
#endif // VK_USE_PLATFORM_WIN32_KHR
// ---- VK_KHR_external_memory_fd extension commands
PFN_vkGetMemoryFdKHR GetMemoryFdKHR;
PFN_vkGetMemoryFdPropertiesKHR GetMemoryFdPropertiesKHR;
// ---- VK_KHR_external_semaphore_win32 extension commands
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkImportSemaphoreWin32HandleKHR ImportSemaphoreWin32HandleKHR;
#endif // VK_USE_PLATFORM_WIN32_KHR
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkGetSemaphoreWin32HandleKHR GetSemaphoreWin32HandleKHR;
#endif // VK_USE_PLATFORM_WIN32_KHR
// ---- VK_KHR_external_semaphore_fd extension commands
PFN_vkImportSemaphoreFdKHR ImportSemaphoreFdKHR;
PFN_vkGetSemaphoreFdKHR GetSemaphoreFdKHR;
// ---- VK_KHR_push_descriptor extension commands
PFN_vkCmdPushDescriptorSetKHR CmdPushDescriptorSetKHR;
@@ -322,6 +351,26 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkUpdateDescriptorSetWithTemplateKHR UpdateDescriptorSetWithTemplateKHR;
PFN_vkCmdPushDescriptorSetWithTemplateKHR CmdPushDescriptorSetWithTemplateKHR;
// ---- VK_KHR_shared_presentable_image extension commands
PFN_vkGetSwapchainStatusKHR GetSwapchainStatusKHR;
// ---- VK_KHR_external_fence_win32 extension commands
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkImportFenceWin32HandleKHR ImportFenceWin32HandleKHR;
#endif // VK_USE_PLATFORM_WIN32_KHR
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkGetFenceWin32HandleKHR GetFenceWin32HandleKHR;
#endif // VK_USE_PLATFORM_WIN32_KHR
// ---- VK_KHR_external_fence_fd extension commands
PFN_vkImportFenceFdKHR ImportFenceFdKHR;
PFN_vkGetFenceFdKHR GetFenceFdKHR;
// ---- VK_KHR_get_memory_requirements2 extension commands
PFN_vkGetImageMemoryRequirements2KHR GetImageMemoryRequirements2KHR;
PFN_vkGetBufferMemoryRequirements2KHR GetBufferMemoryRequirements2KHR;
PFN_vkGetImageSparseMemoryRequirements2KHR GetImageSparseMemoryRequirements2KHR;
// ---- VK_EXT_debug_marker extension commands
PFN_vkDebugMarkerSetObjectTagEXT DebugMarkerSetObjectTagEXT;
PFN_vkDebugMarkerSetObjectNameEXT DebugMarkerSetObjectNameEXT;
@@ -348,30 +397,6 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkAcquireNextImage2KHX AcquireNextImage2KHX;
PFN_vkCmdDispatchBaseKHX CmdDispatchBaseKHX;
// ---- VK_KHX_external_memory_win32 extension commands
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkGetMemoryWin32HandleKHX GetMemoryWin32HandleKHX;
#endif // VK_USE_PLATFORM_WIN32_KHR
#ifdef VK_USE_PLATFORM_WIN32_KHR
PFN_vkGetMemoryWin32HandlePropertiesKHX GetMemoryWin32HandlePropertiesKHX;
#endif // VK_USE_PLATFORM_WIN32_KHR
// ---- VK_KHX_external_memory_fd extension commands
PFN_vkGetMemoryFdKHX GetMemoryFdKHX;
PFN_vkGetMemoryFdPropertiesKHX GetMemoryFdPropertiesKHX;
// ---- VK_KHX_external_semaphore_win32 extension commands
#ifdef VK_USE_PLATFORM_WIN32_KHX
PFN_vkImportSemaphoreWin32HandleKHX ImportSemaphoreWin32HandleKHX;
#endif // VK_USE_PLATFORM_WIN32_KHX
#ifdef VK_USE_PLATFORM_WIN32_KHX
PFN_vkGetSemaphoreWin32HandleKHX GetSemaphoreWin32HandleKHX;
#endif // VK_USE_PLATFORM_WIN32_KHX
// ---- VK_KHX_external_semaphore_fd extension commands
PFN_vkImportSemaphoreFdKHX ImportSemaphoreFdKHX;
PFN_vkGetSemaphoreFdKHX GetSemaphoreFdKHX;
// ---- VK_NVX_device_generated_commands extension commands
PFN_vkCmdProcessCommandsNVX CmdProcessCommandsNVX;
PFN_vkCmdReserveSpaceForCommandsNVX CmdReserveSpaceForCommandsNVX;
@@ -391,8 +416,15 @@ typedef struct VkLayerDispatchTable_ {
PFN_vkRegisterDisplayEventEXT RegisterDisplayEventEXT;
PFN_vkGetSwapchainCounterEXT GetSwapchainCounterEXT;
// ---- VK_GOOGLE_display_timing extension commands
PFN_vkGetRefreshCycleDurationGOOGLE GetRefreshCycleDurationGOOGLE;
PFN_vkGetPastPresentationTimingGOOGLE GetPastPresentationTimingGOOGLE;
// ---- VK_EXT_discard_rectangles extension commands
PFN_vkCmdSetDiscardRectangleEXT CmdSetDiscardRectangleEXT;
// ---- VK_EXT_hdr_metadata extension commands
PFN_vkSetHdrMetadataEXT SetHdrMetadataEXT;
} VkLayerDispatchTable;
@@ -117,4 +117,4 @@ extern "C"
#include <xcb/xcb.h>
#endif
#endif
#endif
File diff suppressed because it is too large Load Diff
+100 -10
View File
@@ -59,7 +59,7 @@ void ReplacePresentableImageLayout(VkImageLayout &layout)
void ReplaceExternalQueueFamily(uint32_t &srcQueueFamily, uint32_t &dstQueueFamily)
{
if(srcQueueFamily == VK_QUEUE_FAMILY_EXTERNAL_KHX || dstQueueFamily == VK_QUEUE_FAMILY_EXTERNAL_KHX)
if(srcQueueFamily == VK_QUEUE_FAMILY_EXTERNAL_KHR || dstQueueFamily == VK_QUEUE_FAMILY_EXTERNAL_KHR)
{
// we should ignore this family transition since we're not synchronising with an
// external access.
@@ -1353,6 +1353,7 @@ BlendMultiplier MakeBlendMultiplier(VkBlendFactor blend)
BlendOp MakeBlendOp(VkBlendOp op)
{
// Need to update this when we support VK_EXT_blend_operation_advanced
switch(op)
{
case VK_BLEND_OP_ADD: return BlendOp::Add;
@@ -2009,6 +2010,7 @@ string ToStrHelper<false, VkPolygonMode>::Get(const VkPolygonMode &el)
TOSTR_CASE_STRINGIZE(VK_POLYGON_MODE_FILL)
TOSTR_CASE_STRINGIZE(VK_POLYGON_MODE_LINE)
TOSTR_CASE_STRINGIZE(VK_POLYGON_MODE_POINT)
TOSTR_CASE_STRINGIZE(VK_POLYGON_MODE_FILL_RECTANGLE_NV)
default: break;
}
@@ -2061,6 +2063,7 @@ string ToStrHelper<false, VkBlendFactor>::Get(const VkBlendFactor &el)
template <>
string ToStrHelper<false, VkBlendOp>::Get(const VkBlendOp &el)
{
// Need to update this when we support VK_EXT_blend_operation_advanced
switch(el)
{
case VK_BLEND_OP_ADD: return "ADD";
@@ -2403,6 +2406,8 @@ string ToStrHelper<false, VkAccessFlagBits>::Get(const VkAccessFlagBits &el)
ret += " | VK_ACCESS_COMMAND_PROCESS_READ_BIT_NVX";
if(el & VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX)
ret += " | VK_ACCESS_COMMAND_PROCESS_WRITE_BIT_NVX";
if(el & VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT)
ret += " | VK_ACCESS_COLOR_ATTACHMENT_READ_NONCOHERENT_BIT_EXT";
if(!ret.empty())
ret = ret.substr(3);
@@ -2465,6 +2470,7 @@ string ToStrHelper<false, VkImageLayout>::Get(const VkImageLayout &el)
case VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL: return "TRANSFER_DST_OPTIMAL";
case VK_IMAGE_LAYOUT_PREINITIALIZED: return "PREINITIALIZED";
case VK_IMAGE_LAYOUT_PRESENT_SRC_KHR: return "PRESENT_SRC_KHR";
case VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR: return "SHARED_PRESENT_SRC_KHR";
default: break;
}
@@ -2474,7 +2480,6 @@ string ToStrHelper<false, VkImageLayout>::Get(const VkImageLayout &el)
template <>
string ToStrHelper<false, VkStructureType>::Get(const VkStructureType &el)
{
// cast to int for WSI enum
switch(el)
{
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_APPLICATION_INFO)
@@ -2545,6 +2550,10 @@ string ToStrHelper<false, VkStructureType>::Get(const VkStructureType &el)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV)
@@ -2559,19 +2568,99 @@ string ToStrHelper<false, VkStructureType>::Get(const VkStructureType &el)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO_KHX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES2_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_HDR_METADATA_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2_KHR)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV)
TOSTR_CASE_STRINGIZE(VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV)
default: break;
}
@@ -2822,6 +2911,7 @@ string ToStrHelper<false, VkResult>::Get(const VkResult &el)
TOSTR_CASE_STRINGIZE(VK_ERROR_VALIDATION_FAILED_EXT)
TOSTR_CASE_STRINGIZE(VK_ERROR_INVALID_SHADER_NV)
TOSTR_CASE_STRINGIZE(VK_ERROR_OUT_OF_POOL_MEMORY_KHR)
TOSTR_CASE_STRINGIZE(VK_ERROR_INVALID_EXTERNAL_HANDLE_KHR)
default: break;
}
@@ -3059,14 +3149,14 @@ static void SerialiseNext(Serialiser *ser, VkStructureType &sType, const void *&
next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV ||
next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHX ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHX)
next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO_KHR ||
next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR)
{
// do nothing
}
-4
View File
@@ -36,10 +36,6 @@
#define VK_NO_PROTOTYPES
#if defined(VK_USE_PLATFORM_WIN32_KHR)
#define VK_USE_PLATFORM_WIN32_KHX 1
#endif
#if ENABLED(RDOC_X64)
#define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object;
+35 -35
View File
@@ -774,6 +774,36 @@ static const VkExtensionProperties supportedExtensions[] = {
{
VK_KHR_DISPLAY_SWAPCHAIN_EXTENSION_NAME, VK_KHR_DISPLAY_SWAPCHAIN_SPEC_VERSION,
},
#endif
{
VK_KHR_EXTERNAL_MEMORY_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_MEMORY_FD_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_FD_SPEC_VERSION,
},
#ifdef VK_KHR_external_memory_win32
{
VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION,
},
#endif
{
VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
VK_KHR_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION,
},
{
VK_KHR_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION,
},
#ifdef VK_KHR_external_semaphore_win32
{
VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION,
},
#endif
{
VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME,
@@ -796,6 +826,11 @@ static const VkExtensionProperties supportedExtensions[] = {
{
VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_KHR_SWAPCHAIN_SPEC_VERSION,
},
#ifdef VK_KHR_win32_keyed_mutex
{
VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME, VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION,
},
#endif
#ifdef VK_KHR_win32_surface
{
VK_KHR_WIN32_SURFACE_EXTENSION_NAME, VK_KHR_WIN32_SURFACE_SPEC_VERSION,
@@ -810,41 +845,6 @@ static const VkExtensionProperties supportedExtensions[] = {
{
VK_KHR_XLIB_SURFACE_EXTENSION_NAME, VK_KHR_XLIB_SURFACE_SPEC_VERSION,
},
#endif
{
VK_KHX_EXTERNAL_MEMORY_EXTENSION_NAME, VK_KHX_EXTERNAL_MEMORY_SPEC_VERSION,
},
{
VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_EXTENSION_NAME,
VK_KHX_EXTERNAL_MEMORY_CAPABILITIES_SPEC_VERSION,
},
{
VK_KHX_EXTERNAL_MEMORY_FD_EXTENSION_NAME, VK_KHX_EXTERNAL_MEMORY_FD_SPEC_VERSION,
},
#ifdef VK_KHX_external_memory_win32
{
VK_KHX_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME, VK_KHX_EXTERNAL_MEMORY_WIN32_SPEC_VERSION,
},
#endif
{
VK_KHX_EXTERNAL_SEMAPHORE_EXTENSION_NAME, VK_KHX_EXTERNAL_SEMAPHORE_SPEC_VERSION,
},
{
VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_EXTENSION_NAME,
VK_KHX_EXTERNAL_SEMAPHORE_CAPABILITIES_SPEC_VERSION,
},
{
VK_KHX_EXTERNAL_SEMAPHORE_FD_EXTENSION_NAME, VK_KHX_EXTERNAL_SEMAPHORE_FD_SPEC_VERSION,
},
#ifdef VK_KHX_external_semaphore_win32
{
VK_KHX_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME, VK_KHX_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION,
},
#endif
#ifdef VK_KHX_win32_keyed_mutex
{
VK_KHX_WIN32_KEYED_MUTEX_EXTENSION_NAME, VK_KHX_WIN32_KEYED_MUTEX_SPEC_VERSION,
},
#endif
{
VK_NV_DEDICATED_ALLOCATION_EXTENSION_NAME, VK_NV_DEDICATED_ALLOCATION_SPEC_VERSION,
+33 -35
View File
@@ -616,7 +616,7 @@ private:
bool EndFrameCapture(void *dev, void *wnd);
bool Serialise_SetShaderDebugPath(Serialiser *localSerialiser, VkDevice device,
VkDebugMarkerObjectTagInfoEXT *pTagInfo);
const VkDebugMarkerObjectTagInfoEXT *pTagInfo);
// replay
@@ -1299,18 +1299,18 @@ public:
// VK_EXT_debug_marker functions
IMPLEMENT_FUNCTION_SERIALISED(VkResult, vkDebugMarkerSetObjectTagEXT, VkDevice device,
VkDebugMarkerObjectTagInfoEXT *pTagInfo);
const VkDebugMarkerObjectTagInfoEXT *pTagInfo);
IMPLEMENT_FUNCTION_SERIALISED(VkResult, vkDebugMarkerSetObjectNameEXT, VkDevice device,
VkDebugMarkerObjectNameInfoEXT *pNameInfo);
const VkDebugMarkerObjectNameInfoEXT *pNameInfo);
IMPLEMENT_FUNCTION_SERIALISED(void, vkCmdDebugMarkerBeginEXT, VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT *pMarker);
const VkDebugMarkerMarkerInfoEXT *pMarker);
IMPLEMENT_FUNCTION_SERIALISED(void, vkCmdDebugMarkerEndEXT, VkCommandBuffer commandBuffer);
IMPLEMENT_FUNCTION_SERIALISED(void, vkCmdDebugMarkerInsertEXT, VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT *pMarker);
const VkDebugMarkerMarkerInfoEXT *pMarker);
// Windowing extension functions
@@ -1367,19 +1367,19 @@ public:
VkResult vkGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE *pHandle);
// VK_KHX_external_memory_win32
VkResult vkGetMemoryWin32HandleKHX(VkDevice device, VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
// VK_KHR_external_memory_win32
VkResult vkGetMemoryWin32HandleKHR(VkDevice device,
const VkMemoryGetWin32HandleInfoKHR *pGetWin32HandleInfo,
HANDLE *pHandle);
VkResult vkGetMemoryWin32HandlePropertiesKHX(
VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHX handleType, HANDLE handle,
VkMemoryWin32HandlePropertiesKHX *pMemoryWin32HandleProperties);
VkResult vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle,
VkMemoryWin32HandlePropertiesKHR *pMemoryWin32HandleProperties);
// VK_KHX_external_semaphore_win32
VkResult vkImportSemaphoreWin32HandleKHX(
VkDevice device, const VkImportSemaphoreWin32HandleInfoKHX *pImportSemaphoreWin32HandleInfo);
VkResult vkGetSemaphoreWin32HandleKHX(VkDevice device, VkSemaphore semaphore,
VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
// VK_KHR_external_semaphore_win32
VkResult vkImportSemaphoreWin32HandleKHR(
VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR *pImportSemaphoreWin32HandleInfo);
VkResult vkGetSemaphoreWin32HandleKHR(VkDevice device,
const VkSemaphoreGetWin32HandleInfoKHR *pGetWin32HandleInfo,
HANDLE *pHandle);
#endif
@@ -1502,28 +1502,26 @@ public:
// VK_EXT_direct_mode_display
VkResult vkReleaseDisplayEXT(VkPhysicalDevice physicalDevice, VkDisplayKHR display);
// VK_KHX_external_memory_capabilities
void vkGetPhysicalDeviceExternalBufferPropertiesKHX(
// VK_KHR_external_memory_capabilities
void vkGetPhysicalDeviceExternalBufferPropertiesKHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalBufferInfoKHX *pExternalBufferInfo,
VkExternalBufferPropertiesKHX *pExternalBufferProperties);
const VkPhysicalDeviceExternalBufferInfoKHR *pExternalBufferInfo,
VkExternalBufferPropertiesKHR *pExternalBufferProperties);
// VK_KHX_external_memory_fd
VkResult vkGetMemoryFdKHX(VkDevice device, VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagBitsKHX handleType, int *pFd);
VkResult vkGetMemoryFdPropertiesKHX(VkDevice device,
VkExternalMemoryHandleTypeFlagBitsKHX handleType, int fd,
VkMemoryFdPropertiesKHX *pMemoryFdProperties);
// VK_KHR_external_memory_fd
VkResult vkGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR *pGetFdInfo, int *pFd);
VkResult vkGetMemoryFdPropertiesKHR(VkDevice device,
VkExternalMemoryHandleTypeFlagBitsKHR handleType, int fd,
VkMemoryFdPropertiesKHR *pMemoryFdProperties);
// VK_KHX_external_semaphore_capabilities
void vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
// VK_KHR_external_semaphore_capabilities
void vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfoKHX *pExternalSemaphoreInfo,
VkExternalSemaphorePropertiesKHX *pExternalSemaphoreProperties);
const VkPhysicalDeviceExternalSemaphoreInfoKHR *pExternalSemaphoreInfo,
VkExternalSemaphorePropertiesKHR *pExternalSemaphoreProperties);
// VK_KHX_external_semaphore_fd
VkResult vkImportSemaphoreFdKHX(VkDevice device,
const VkImportSemaphoreFdInfoKHX *pImportSemaphoreFdInfo);
VkResult vkGetSemaphoreFdKHX(VkDevice device, VkSemaphore semaphore,
VkExternalSemaphoreHandleTypeFlagBitsKHX handleType, int *pFd);
// VK_KHR_external_semaphore_fd
VkResult vkImportSemaphoreFdKHR(VkDevice device,
const VkImportSemaphoreFdInfoKHR *pImportSemaphoreFdInfo);
VkResult vkGetSemaphoreFdKHR(VkDevice device, const VkSemaphoreGetFdInfoKHR *pGetFdInfo, int *pFd);
};
+52 -52
View File
@@ -34,28 +34,28 @@
#define HookInitDevice_PlatformSpecific() \
HookInitExtension(VK_NV_win32_keyed_mutex, GetMemoryWin32HandleNV); \
HookInitExtension(VK_KHX_external_memory_win32, GetMemoryWin32HandleKHX); \
HookInitExtension(VK_KHX_external_memory_win32, GetMemoryWin32HandlePropertiesKHX); \
HookInitExtension(VK_KHX_external_semaphore_win32, ImportSemaphoreWin32HandleKHX); \
HookInitExtension(VK_KHX_external_semaphore_win32, GetSemaphoreWin32HandleKHX);
HookInitExtension(VK_KHR_external_memory_win32, GetMemoryWin32HandleKHR); \
HookInitExtension(VK_KHR_external_memory_win32, GetMemoryWin32HandlePropertiesKHR); \
HookInitExtension(VK_KHR_external_semaphore_win32, ImportSemaphoreWin32HandleKHR); \
HookInitExtension(VK_KHR_external_semaphore_win32, GetSemaphoreWin32HandleKHR);
#define HookDefine_PlatformSpecific() \
HookDefine4(VkResult, vkCreateWin32SurfaceKHR, VkInstance, instance, \
const VkWin32SurfaceCreateInfoKHR *, pCreateInfo, const VkAllocationCallbacks *, \
pAllocator, VkSurfaceKHR *, pSurface); \
HookDefine2(VkBool32, vkGetPhysicalDeviceWin32PresentationSupportKHR, VkPhysicalDevice, \
physicalDevice, uint32_t, queueFamilyIndex); \
HookDefine4(VkResult, vkGetMemoryWin32HandleNV, VkDevice, device, VkDeviceMemory, memory, \
VkExternalMemoryHandleTypeFlagsNV, handleType, HANDLE *, pHandle); \
HookDefine4(VkResult, vkGetMemoryWin32HandleKHX, VkDevice, device, VkDeviceMemory, memory, \
VkExternalMemoryHandleTypeFlagBitsKHX, handleType, HANDLE *, pHandle); \
HookDefine4(VkResult, vkGetMemoryWin32HandlePropertiesKHX, VkDevice, device, \
VkExternalMemoryHandleTypeFlagBitsKHX, handleType, HANDLE, handle, \
VkMemoryWin32HandlePropertiesKHX *, pMemoryWin32HandleProperties); \
HookDefine2(VkResult, vkImportSemaphoreWin32HandleKHX, VkDevice, device, \
const VkImportSemaphoreWin32HandleInfoKHX *, pImportSemaphoreWin32HandleInfo); \
HookDefine4(VkResult, vkGetSemaphoreWin32HandleKHX, VkDevice, device, VkSemaphore, semaphore, \
VkExternalSemaphoreHandleTypeFlagBitsKHX, handleType, HANDLE *, pHandle);
#define HookDefine_PlatformSpecific() \
HookDefine4(VkResult, vkCreateWin32SurfaceKHR, VkInstance, instance, \
const VkWin32SurfaceCreateInfoKHR *, pCreateInfo, const VkAllocationCallbacks *, \
pAllocator, VkSurfaceKHR *, pSurface); \
HookDefine2(VkBool32, vkGetPhysicalDeviceWin32PresentationSupportKHR, VkPhysicalDevice, \
physicalDevice, uint32_t, queueFamilyIndex); \
HookDefine4(VkResult, vkGetMemoryWin32HandleNV, VkDevice, device, VkDeviceMemory, memory, \
VkExternalMemoryHandleTypeFlagsNV, handleType, HANDLE *, pHandle); \
HookDefine3(VkResult, vkGetMemoryWin32HandleKHR, VkDevice, device, \
const VkMemoryGetWin32HandleInfoKHR *, pGetWin32HandleInfo, HANDLE *, pHandle); \
HookDefine4(VkResult, vkGetMemoryWin32HandlePropertiesKHR, VkDevice, device, \
VkExternalMemoryHandleTypeFlagBitsKHR, handleType, HANDLE, handle, \
VkMemoryWin32HandlePropertiesKHR *, pMemoryWin32HandleProperties); \
HookDefine2(VkResult, vkImportSemaphoreWin32HandleKHR, VkDevice, device, \
const VkImportSemaphoreWin32HandleInfoKHR *, pImportSemaphoreWin32HandleInfo); \
HookDefine3(VkResult, vkGetSemaphoreWin32HandleKHR, VkDevice, device, \
const VkSemaphoreGetWin32HandleInfoKHR *, pGetWin32HandleInfo, HANDLE *, pHandle);
#elif defined(VK_USE_PLATFORM_ANDROID_KHR)
@@ -281,8 +281,8 @@
CheckExt(VK_EXT_display_surface_counter); \
CheckExt(VK_EXT_direct_mode_display); \
CheckExt(VK_EXT_acquire_xlib_display); \
CheckExt(VK_KHX_external_memory_capabilities); \
CheckExt(VK_KHX_external_semaphore_capabilities);
CheckExt(VK_KHR_external_memory_capabilities); \
CheckExt(VK_KHR_external_semaphore_capabilities);
#define CheckDeviceExts() \
CheckExt(VK_EXT_debug_marker); \
@@ -293,12 +293,12 @@
CheckExt(VK_NV_win32_keyed_mutex); \
CheckExt(VK_KHR_maintenance1); \
CheckExt(VK_EXT_display_control); \
CheckExt(VK_KHX_external_memory); \
CheckExt(VK_KHX_external_memory_win32); \
CheckExt(VK_KHX_external_memory_fd); \
CheckExt(VK_KHX_external_semaphore); \
CheckExt(VK_KHX_external_semaphore_win32); \
CheckExt(VK_KHX_external_semaphore_fd);
CheckExt(VK_KHR_external_memory); \
CheckExt(VK_KHR_external_memory_win32); \
CheckExt(VK_KHR_external_memory_fd); \
CheckExt(VK_KHR_external_semaphore); \
CheckExt(VK_KHR_external_semaphore_win32); \
CheckExt(VK_KHR_external_semaphore_fd);
#define HookInitVulkanInstanceExts() \
HookInitExtension(VK_KHR_surface, DestroySurfaceKHR); \
@@ -330,10 +330,10 @@
GetPhysicalDeviceSparseImageFormatProperties2KHR); \
HookInitExtension(VK_EXT_direct_mode_display, ReleaseDisplayEXT); \
HookInitExtension(VK_EXT_display_surface_counter, GetPhysicalDeviceSurfaceCapabilities2EXT); \
HookInitExtension(VK_KHX_external_memory_capabilities, \
GetPhysicalDeviceExternalBufferPropertiesKHX); \
HookInitExtension(VK_KHX_external_semaphore_capabilities, \
GetPhysicalDeviceExternalSemaphorePropertiesKHX); \
HookInitExtension(VK_KHR_external_memory_capabilities, \
GetPhysicalDeviceExternalBufferPropertiesKHR); \
HookInitExtension(VK_KHR_external_semaphore_capabilities, \
GetPhysicalDeviceExternalSemaphorePropertiesKHR); \
HookInitInstance_PlatformSpecific()
#define HookInitVulkanDeviceExts() \
@@ -353,10 +353,10 @@
HookInitExtension(VK_EXT_display_control, RegisterDeviceEventEXT); \
HookInitExtension(VK_EXT_display_control, RegisterDisplayEventEXT); \
HookInitExtension(VK_EXT_display_control, GetSwapchainCounterEXT); \
HookInitExtension(VK_KHX_external_memory_fd, GetMemoryFdKHX); \
HookInitExtension(VK_KHX_external_memory_fd, GetMemoryFdPropertiesKHX); \
HookInitExtension(VK_KHX_external_semaphore_fd, ImportSemaphoreFdKHX); \
HookInitExtension(VK_KHX_external_semaphore_fd, GetSemaphoreFdKHX); \
HookInitExtension(VK_KHR_external_memory_fd, GetMemoryFdKHR); \
HookInitExtension(VK_KHR_external_memory_fd, GetMemoryFdPropertiesKHR); \
HookInitExtension(VK_KHR_external_semaphore_fd, ImportSemaphoreFdKHR); \
HookInitExtension(VK_KHR_external_semaphore_fd, GetSemaphoreFdKHR); \
HookInitDevice_PlatformSpecific()
#define DefineHooks() \
@@ -741,22 +741,22 @@
VkSurfaceCounterFlagBitsEXT, counter, uint64_t *, pCounterValue); \
HookDefine2(VkResult, vkReleaseDisplayEXT, VkPhysicalDevice, physicalDevice, VkDisplayKHR, \
display); \
HookDefine3(void, vkGetPhysicalDeviceExternalBufferPropertiesKHX, VkPhysicalDevice, \
physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHX *, pExternalBufferInfo, \
VkExternalBufferPropertiesKHX *, pExternalBufferProperties); \
HookDefine4(VkResult, vkGetMemoryFdKHX, VkDevice, device, VkDeviceMemory, memory, \
VkExternalMemoryHandleTypeFlagBitsKHX, handleType, int *, pFd); \
HookDefine4(VkResult, vkGetMemoryFdPropertiesKHX, VkDevice, device, \
VkExternalMemoryHandleTypeFlagBitsKHX, handleType, int, fd, \
VkMemoryFdPropertiesKHX *, pMemoryFdProperties); \
HookDefine3(void, vkGetPhysicalDeviceExternalSemaphorePropertiesKHX, VkPhysicalDevice, \
physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfoKHX *, \
pExternalSemaphoreInfo, VkExternalSemaphorePropertiesKHX *, \
HookDefine3(void, vkGetPhysicalDeviceExternalBufferPropertiesKHR, VkPhysicalDevice, \
physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHR *, pExternalBufferInfo, \
VkExternalBufferPropertiesKHR *, pExternalBufferProperties); \
HookDefine3(VkResult, vkGetMemoryFdKHR, VkDevice, device, const VkMemoryGetFdInfoKHR *, \
pGetFdInfo, int *, pFd); \
HookDefine4(VkResult, vkGetMemoryFdPropertiesKHR, VkDevice, device, \
VkExternalMemoryHandleTypeFlagBitsKHR, handleType, int, fd, \
VkMemoryFdPropertiesKHR *, pMemoryFdProperties); \
HookDefine3(void, vkGetPhysicalDeviceExternalSemaphorePropertiesKHR, VkPhysicalDevice, \
physicalDevice, const VkPhysicalDeviceExternalSemaphoreInfoKHR *, \
pExternalSemaphoreInfo, VkExternalSemaphorePropertiesKHR *, \
pExternalSemaphoreProperties); \
HookDefine2(VkResult, vkImportSemaphoreFdKHX, VkDevice, device, \
const VkImportSemaphoreFdInfoKHX *, pImportSemaphoreFdInfo); \
HookDefine4(VkResult, vkGetSemaphoreFdKHX, VkDevice, device, VkSemaphore, semaphore, \
VkExternalSemaphoreHandleTypeFlagBitsKHX, handleType, int *, pFd); \
HookDefine2(VkResult, vkImportSemaphoreFdKHR, VkDevice, device, \
const VkImportSemaphoreFdInfoKHR *, pImportSemaphoreFdInfo); \
HookDefine3(VkResult, vkGetSemaphoreFdKHR, VkDevice, device, const VkSemaphoreGetFdInfoKHR *, \
pGetFdInfo, int *, pFd); \
HookDefine_PlatformSpecific()
struct VkLayerInstanceDispatchTableExtended : VkLayerInstanceDispatchTable
@@ -2639,7 +2639,7 @@ void WrappedVulkan::vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t
bool WrappedVulkan::Serialise_vkCmdDebugMarkerBeginEXT(Serialiser *localSerialiser,
VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT *pMarker)
const VkDebugMarkerMarkerInfoEXT *pMarker)
{
SERIALISE_ELEMENT(ResourceId, cmdid, GetResID(commandBuffer));
SERIALISE_ELEMENT(string, name,
@@ -2672,7 +2672,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerBeginEXT(Serialiser *localSerialis
}
void WrappedVulkan::vkCmdDebugMarkerBeginEXT(VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT *pMarker)
const VkDebugMarkerMarkerInfoEXT *pMarker)
{
if(ObjDisp(commandBuffer)->CmdDebugMarkerBeginEXT)
ObjDisp(commandBuffer)->CmdDebugMarkerBeginEXT(Unwrap(commandBuffer), pMarker);
@@ -2741,7 +2741,7 @@ void WrappedVulkan::vkCmdDebugMarkerEndEXT(VkCommandBuffer commandBuffer)
bool WrappedVulkan::Serialise_vkCmdDebugMarkerInsertEXT(Serialiser *localSerialiser,
VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT *pMarker)
const VkDebugMarkerMarkerInfoEXT *pMarker)
{
SERIALISE_ELEMENT(ResourceId, cmdid, GetResID(commandBuffer));
SERIALISE_ELEMENT(string, name,
@@ -2774,7 +2774,7 @@ bool WrappedVulkan::Serialise_vkCmdDebugMarkerInsertEXT(Serialiser *localSeriali
}
void WrappedVulkan::vkCmdDebugMarkerInsertEXT(VkCommandBuffer commandBuffer,
VkDebugMarkerMarkerInfoEXT *pMarker)
const VkDebugMarkerMarkerInfoEXT *pMarker)
{
if(ObjDisp(commandBuffer)->CmdDebugMarkerInsertEXT)
ObjDisp(commandBuffer)->CmdDebugMarkerInsertEXT(Unwrap(commandBuffer), pMarker);
@@ -254,54 +254,56 @@ VkResult WrappedVulkan::vkGetMemoryWin32HandleNV(VkDevice device, VkDeviceMemory
return ObjDisp(device)->GetMemoryWin32HandleNV(Unwrap(device), Unwrap(memory), handleType, pHandle);
}
VkResult WrappedVulkan::vkGetMemoryWin32HandleKHX(VkDevice device, VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
HANDLE *pHandle)
VkResult WrappedVulkan::vkGetMemoryWin32HandleKHR(
VkDevice device, const VkMemoryGetWin32HandleInfoKHR *pGetWin32HandleInfo, HANDLE *pHandle)
{
return ObjDisp(device)->GetMemoryWin32HandleKHX(Unwrap(device), Unwrap(memory), handleType,
pHandle);
VkMemoryGetWin32HandleInfoKHR unwrappedInfo = *pGetWin32HandleInfo;
unwrappedInfo.memory = Unwrap(unwrappedInfo.memory);
return ObjDisp(device)->GetMemoryWin32HandleKHR(Unwrap(device), &unwrappedInfo, pHandle);
}
VkResult WrappedVulkan::vkGetMemoryWin32HandlePropertiesKHX(
VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHX handleType, HANDLE handle,
VkMemoryWin32HandlePropertiesKHX *pMemoryWin32HandleProperties)
VkResult WrappedVulkan::vkGetMemoryWin32HandlePropertiesKHR(
VkDevice device, VkExternalMemoryHandleTypeFlagBitsKHR handleType, HANDLE handle,
VkMemoryWin32HandlePropertiesKHR *pMemoryWin32HandleProperties)
{
return ObjDisp(device)->GetMemoryWin32HandlePropertiesKHX(Unwrap(device), handleType, handle,
return ObjDisp(device)->GetMemoryWin32HandlePropertiesKHR(Unwrap(device), handleType, handle,
pMemoryWin32HandleProperties);
}
#endif
VkResult WrappedVulkan::vkGetMemoryFdKHX(VkDevice device, VkDeviceMemory memory,
VkExternalMemoryHandleTypeFlagBitsKHX handleType, int *pFd)
VkResult WrappedVulkan::vkGetMemoryFdKHR(VkDevice device, const VkMemoryGetFdInfoKHR *pGetFdInfo,
int *pFd)
{
return ObjDisp(device)->GetMemoryFdKHX(Unwrap(device), Unwrap(memory), handleType, pFd);
VkMemoryGetFdInfoKHR unwrappedInfo = *pGetFdInfo;
unwrappedInfo.memory = Unwrap(unwrappedInfo.memory);
return ObjDisp(device)->GetMemoryFdKHR(Unwrap(device), &unwrappedInfo, pFd);
}
VkResult WrappedVulkan::vkGetMemoryFdPropertiesKHX(VkDevice device,
VkExternalMemoryHandleTypeFlagBitsKHX handleType,
VkResult WrappedVulkan::vkGetMemoryFdPropertiesKHR(VkDevice device,
VkExternalMemoryHandleTypeFlagBitsKHR handleType,
int fd,
VkMemoryFdPropertiesKHX *pMemoryFdProperties)
VkMemoryFdPropertiesKHR *pMemoryFdProperties)
{
return ObjDisp(device)->GetMemoryFdPropertiesKHX(Unwrap(device), handleType, fd,
return ObjDisp(device)->GetMemoryFdPropertiesKHR(Unwrap(device), handleType, fd,
pMemoryFdProperties);
}
void WrappedVulkan::vkGetPhysicalDeviceExternalBufferPropertiesKHX(
VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHX *pExternalBufferInfo,
VkExternalBufferPropertiesKHX *pExternalBufferProperties)
void WrappedVulkan::vkGetPhysicalDeviceExternalBufferPropertiesKHR(
VkPhysicalDevice physicalDevice, const VkPhysicalDeviceExternalBufferInfoKHR *pExternalBufferInfo,
VkExternalBufferPropertiesKHR *pExternalBufferProperties)
{
return ObjDisp(physicalDevice)
->GetPhysicalDeviceExternalBufferPropertiesKHX(Unwrap(physicalDevice), pExternalBufferInfo,
->GetPhysicalDeviceExternalBufferPropertiesKHR(Unwrap(physicalDevice), pExternalBufferInfo,
pExternalBufferProperties);
}
void WrappedVulkan::vkGetPhysicalDeviceExternalSemaphorePropertiesKHX(
void WrappedVulkan::vkGetPhysicalDeviceExternalSemaphorePropertiesKHR(
VkPhysicalDevice physicalDevice,
const VkPhysicalDeviceExternalSemaphoreInfoKHX *pExternalSemaphoreInfo,
VkExternalSemaphorePropertiesKHX *pExternalSemaphoreProperties)
const VkPhysicalDeviceExternalSemaphoreInfoKHR *pExternalSemaphoreInfo,
VkExternalSemaphorePropertiesKHR *pExternalSemaphoreProperties)
{
return ObjDisp(physicalDevice)
->GetPhysicalDeviceExternalSemaphorePropertiesKHX(
->GetPhysicalDeviceExternalSemaphorePropertiesKHR(
Unwrap(physicalDevice), pExternalSemaphoreInfo, pExternalSemaphoreProperties);
}
@@ -999,13 +999,14 @@ static VkResourceRecord *GetObjRecord(VkDebugReportObjectTypeEXT objType, uint64
case VK_DEBUG_REPORT_OBJECT_TYPE_RANGE_SIZE_EXT:
case VK_DEBUG_REPORT_OBJECT_TYPE_OBJECT_TABLE_NVX_EXT:
case VK_DEBUG_REPORT_OBJECT_TYPE_INDIRECT_COMMANDS_LAYOUT_NVX_EXT:
case VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_KHR_EXT:
case VK_DEBUG_REPORT_OBJECT_TYPE_MAX_ENUM_EXT: break;
}
return NULL;
}
bool WrappedVulkan::Serialise_SetShaderDebugPath(Serialiser *localSerialiser, VkDevice device,
VkDebugMarkerObjectTagInfoEXT *pTagInfo)
const VkDebugMarkerObjectTagInfoEXT *pTagInfo)
{
SERIALISE_ELEMENT(ResourceId, id,
GetObjRecord(pTagInfo->objectType, pTagInfo->object)->GetResourceID());
@@ -1028,7 +1029,7 @@ bool WrappedVulkan::Serialise_SetShaderDebugPath(Serialiser *localSerialiser, Vk
}
VkResult WrappedVulkan::vkDebugMarkerSetObjectTagEXT(VkDevice device,
VkDebugMarkerObjectTagInfoEXT *pTagInfo)
const VkDebugMarkerObjectTagInfoEXT *pTagInfo)
{
if(m_State >= WRITING && pTagInfo)
{
@@ -1084,9 +1085,8 @@ VkResult WrappedVulkan::vkDebugMarkerSetObjectTagEXT(VkDevice device,
return VK_SUCCESS;
}
bool WrappedVulkan::Serialise_vkDebugMarkerSetObjectNameEXT(Serialiser *localSerialiser,
VkDevice device,
VkDebugMarkerObjectNameInfoEXT *pNameInfo)
bool WrappedVulkan::Serialise_vkDebugMarkerSetObjectNameEXT(
Serialiser *localSerialiser, VkDevice device, const VkDebugMarkerObjectNameInfoEXT *pNameInfo)
{
SERIALISE_ELEMENT(ResourceId, id,
GetObjRecord(pNameInfo->objectType, pNameInfo->object)->GetResourceID());
@@ -1112,7 +1112,7 @@ bool WrappedVulkan::Serialise_vkDebugMarkerSetObjectNameEXT(Serialiser *localSer
}
VkResult WrappedVulkan::vkDebugMarkerSetObjectNameEXT(VkDevice device,
VkDebugMarkerObjectNameInfoEXT *pNameInfo)
const VkDebugMarkerObjectNameInfoEXT *pNameInfo)
{
if(m_State >= WRITING && pNameInfo)
{
@@ -471,37 +471,37 @@ VkResult WrappedVulkan::vkQueueSubmit(VkQueue queue, uint32_t submitCount,
RDCERR("Invalid extension structure");
}
else if(next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV ||
next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX)
next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR)
{
#ifdef VK_USE_PLATFORM_WIN32_KHR
// make sure the structures are still identical
RDCCOMPILE_ASSERT(sizeof(VkWin32KeyedMutexAcquireReleaseInfoNV) ==
sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHX),
sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR),
"Structs are different!");
#define NV_DUMMY ((VkWin32KeyedMutexAcquireReleaseInfoNV *)NULL)
#define KHX_DUMMY ((VkWin32KeyedMutexAcquireReleaseInfoKHX *)NULL)
RDCCOMPILE_ASSERT(&NV_DUMMY->acquireCount == &KHX_DUMMY->acquireCount,
#define KHR_DUMMY ((VkWin32KeyedMutexAcquireReleaseInfoKHR *)NULL)
RDCCOMPILE_ASSERT(&NV_DUMMY->acquireCount == &KHR_DUMMY->acquireCount,
"Structs are different!");
RDCCOMPILE_ASSERT(&NV_DUMMY->releaseCount == &KHX_DUMMY->releaseCount,
RDCCOMPILE_ASSERT(&NV_DUMMY->releaseCount == &KHR_DUMMY->releaseCount,
"Structs are different!");
RDCCOMPILE_ASSERT(&NV_DUMMY->pAcquireSyncs == &KHX_DUMMY->pAcquireSyncs,
RDCCOMPILE_ASSERT(&NV_DUMMY->pAcquireSyncs == &KHR_DUMMY->pAcquireSyncs,
"Structs are different!");
RDCCOMPILE_ASSERT(&NV_DUMMY->pReleaseSyncs == &KHX_DUMMY->pReleaseSyncs,
RDCCOMPILE_ASSERT(&NV_DUMMY->pReleaseSyncs == &KHR_DUMMY->pReleaseSyncs,
"Structs are different!");
#undef NV_DUMMY
#undef KHX_DUMMY
#undef KHR_DUMMY
tempmemSize += sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHX);
tempmemSize += sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR);
VkWin32KeyedMutexAcquireReleaseInfoKHX *info = (VkWin32KeyedMutexAcquireReleaseInfoKHX *)next;
VkWin32KeyedMutexAcquireReleaseInfoKHR *info = (VkWin32KeyedMutexAcquireReleaseInfoKHR *)next;
tempmemSize += info->acquireCount * sizeof(VkDeviceMemory);
tempmemSize += info->releaseCount * sizeof(VkDeviceMemory);
#else
RDCERR("Unexpected use of Win32 Keyed Mutex extension without support compiled in");
#endif
}
else if(next->sType == VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHX)
else if(next->sType == VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR)
{
// nothing to do - this is plain old data with nothing to unwrap so we can keep it in the
// pNext chain as-is
@@ -556,38 +556,38 @@ VkResult WrappedVulkan::vkQueueSubmit(VkQueue queue, uint32_t submitCount,
VkGenericStruct *next = *nextptr;
if(next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV ||
next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHX)
next->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR)
{
#ifdef VK_USE_PLATFORM_WIN32_KHR
// allocate local unwrapped struct
VkWin32KeyedMutexAcquireReleaseInfoKHX *unwrappedMutexInfoKHX =
(VkWin32KeyedMutexAcquireReleaseInfoKHX *)memory;
memory += sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHX);
VkWin32KeyedMutexAcquireReleaseInfoKHR *unwrappedMutexInfoKHR =
(VkWin32KeyedMutexAcquireReleaseInfoKHR *)memory;
memory += sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR);
// copy over info from original struct
VkWin32KeyedMutexAcquireReleaseInfoKHX *wrappedMutexInfoKHX =
(VkWin32KeyedMutexAcquireReleaseInfoKHX *)next;
*unwrappedMutexInfoKHX = *wrappedMutexInfoKHX;
VkWin32KeyedMutexAcquireReleaseInfoKHR *wrappedMutexInfoKHR =
(VkWin32KeyedMutexAcquireReleaseInfoKHR *)next;
*unwrappedMutexInfoKHR = *wrappedMutexInfoKHR;
// allocate unwrapped arrays
VkDeviceMemory *unwrappedAcquires = (VkDeviceMemory *)memory;
memory += sizeof(VkDeviceMemory) * unwrappedMutexInfoKHX->acquireCount;
memory += sizeof(VkDeviceMemory) * unwrappedMutexInfoKHR->acquireCount;
VkDeviceMemory *unwrappedReleases = (VkDeviceMemory *)memory;
memory += sizeof(VkDeviceMemory) * unwrappedMutexInfoKHX->releaseCount;
memory += sizeof(VkDeviceMemory) * unwrappedMutexInfoKHR->releaseCount;
// unwrap the arrays
for(uint32_t mem = 0; mem < unwrappedMutexInfoKHX->acquireCount; mem++)
unwrappedAcquires[mem] = Unwrap(wrappedMutexInfoKHX->pAcquireSyncs[mem]);
for(uint32_t mem = 0; mem < unwrappedMutexInfoKHX->releaseCount; mem++)
unwrappedReleases[mem] = Unwrap(wrappedMutexInfoKHX->pReleaseSyncs[mem]);
for(uint32_t mem = 0; mem < unwrappedMutexInfoKHR->acquireCount; mem++)
unwrappedAcquires[mem] = Unwrap(wrappedMutexInfoKHR->pAcquireSyncs[mem]);
for(uint32_t mem = 0; mem < unwrappedMutexInfoKHR->releaseCount; mem++)
unwrappedReleases[mem] = Unwrap(wrappedMutexInfoKHR->pReleaseSyncs[mem]);
unwrappedMutexInfoKHX->pAcquireSyncs = unwrappedAcquires;
unwrappedMutexInfoKHX->pReleaseSyncs = unwrappedReleases;
unwrappedMutexInfoKHR->pAcquireSyncs = unwrappedAcquires;
unwrappedMutexInfoKHR->pReleaseSyncs = unwrappedReleases;
// insert this struct into the chain.
// nextptr is pointing to the address of the pNext, so we can overwrite it to point to our
// locally-allocated unwrapped struct
*nextptr = (VkGenericStruct *)unwrappedMutexInfoKHX;
*nextptr = (VkGenericStruct *)unwrappedMutexInfoKHR;
#endif
}
@@ -276,10 +276,10 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate
// the rest we don't need to unwrap, but we need to copy locally for chaining
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV)
memSize += sizeof(VkExportMemoryAllocateInfoNV);
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX)
memSize += sizeof(VkExportMemoryAllocateInfoKHX);
else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX)
memSize += sizeof(VkImportMemoryFdInfoKHX);
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR)
memSize += sizeof(VkExportMemoryAllocateInfoKHR);
else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR)
memSize += sizeof(VkImportMemoryFdInfoKHR);
#ifdef VK_NV_external_memory_win32
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV)
@@ -293,16 +293,16 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate
RDCERR("Support for VK_NV_external_memory_win32 not compiled in");
#endif
#ifdef VK_KHX_external_memory_win32
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX)
memSize += sizeof(VkExportMemoryWin32HandleInfoKHX);
else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX)
memSize += sizeof(VkImportMemoryWin32HandleInfoKHX);
#ifdef VK_KHR_external_memory_win32
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
memSize += sizeof(VkExportMemoryWin32HandleInfoKHR);
else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
memSize += sizeof(VkImportMemoryWin32HandleInfoKHR);
#else
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX)
RDCERR("Support for VK_KHX_external_memory_win32 not compiled in");
else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX)
RDCERR("Support for VK_KHX_external_memory_win32 not compiled in");
else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
RDCERR("Support for VK_KHR_external_memory_win32 not compiled in");
else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
RDCERR("Support for VK_KHR_external_memory_win32 not compiled in");
#endif
next = next->pNext;
@@ -335,28 +335,28 @@ VkResult WrappedVulkan::vkAllocateMemory(VkDevice device, const VkMemoryAllocate
{
CopyNextChainedStruct<VkExportMemoryAllocateInfoNV>(tempMem, nextInput, nextChainTail);
}
else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHX)
else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_KHR)
{
CopyNextChainedStruct<VkExportMemoryAllocateInfoKHX>(tempMem, nextInput, nextChainTail);
CopyNextChainedStruct<VkExportMemoryAllocateInfoKHR>(tempMem, nextInput, nextChainTail);
}
else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHX)
else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR)
{
CopyNextChainedStruct<VkImportMemoryFdInfoKHX>(tempMem, nextInput, nextChainTail);
CopyNextChainedStruct<VkImportMemoryFdInfoKHR>(tempMem, nextInput, nextChainTail);
}
else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHX)
else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
{
#ifdef VK_KHX_external_memory_win32
CopyNextChainedStruct<VkExportMemoryWin32HandleInfoKHX>(tempMem, nextInput, nextChainTail);
#ifdef VK_KHR_external_memory_win32
CopyNextChainedStruct<VkExportMemoryWin32HandleInfoKHR>(tempMem, nextInput, nextChainTail);
#else
RDCERR("Support for VK_KHX_external_memory_win32 not compiled in");
RDCERR("Support for VK_KHR_external_memory_win32 not compiled in");
#endif
}
else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHX)
else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR)
{
#ifdef VK_KHX_external_memory_win32
CopyNextChainedStruct<VkImportMemoryWin32HandleInfoKHX>(tempMem, nextInput, nextChainTail);
#ifdef VK_KHR_external_memory_win32
CopyNextChainedStruct<VkImportMemoryWin32HandleInfoKHR>(tempMem, nextInput, nextChainTail);
#else
RDCERR("Support for VK_KHX_external_memory_win32 not compiled in");
RDCERR("Support for VK_KHR_external_memory_win32 not compiled in");
#endif
}
else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV)
@@ -842,39 +842,40 @@ void WrappedVulkan::vkCmdWaitEvents(VkCommandBuffer cmdBuffer, uint32_t eventCou
}
}
VkResult WrappedVulkan::vkImportSemaphoreFdKHX(VkDevice device,
const VkImportSemaphoreFdInfoKHX *pImportSemaphoreFdInfo)
VkResult WrappedVulkan::vkImportSemaphoreFdKHR(VkDevice device,
const VkImportSemaphoreFdInfoKHR *pImportSemaphoreFdInfo)
{
VkImportSemaphoreFdInfoKHX unwrappedInfo = *pImportSemaphoreFdInfo;
VkImportSemaphoreFdInfoKHR unwrappedInfo = *pImportSemaphoreFdInfo;
unwrappedInfo.semaphore = Unwrap(unwrappedInfo.semaphore);
return ObjDisp(device)->ImportSemaphoreFdKHX(Unwrap(device), &unwrappedInfo);
return ObjDisp(device)->ImportSemaphoreFdKHR(Unwrap(device), &unwrappedInfo);
}
VkResult WrappedVulkan::vkGetSemaphoreFdKHX(VkDevice device, VkSemaphore semaphore,
VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
int *pFd)
VkResult WrappedVulkan::vkGetSemaphoreFdKHR(VkDevice device,
const VkSemaphoreGetFdInfoKHR *pGetFdInfo, int *pFd)
{
return ObjDisp(device)->GetSemaphoreFdKHX(Unwrap(device), Unwrap(semaphore), handleType, pFd);
VkSemaphoreGetFdInfoKHR unwrappedInfo = *pGetFdInfo;
unwrappedInfo.semaphore = Unwrap(unwrappedInfo.semaphore);
return ObjDisp(device)->GetSemaphoreFdKHR(Unwrap(device), &unwrappedInfo, pFd);
}
#if defined(VK_USE_PLATFORM_WIN32_KHR)
VkResult WrappedVulkan::vkImportSemaphoreWin32HandleKHX(
VkDevice device, const VkImportSemaphoreWin32HandleInfoKHX *pImportSemaphoreWin32HandleInfo)
VkResult WrappedVulkan::vkImportSemaphoreWin32HandleKHR(
VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR *pImportSemaphoreWin32HandleInfo)
{
VkImportSemaphoreWin32HandleInfoKHX unwrappedInfo = *pImportSemaphoreWin32HandleInfo;
VkImportSemaphoreWin32HandleInfoKHR unwrappedInfo = *pImportSemaphoreWin32HandleInfo;
unwrappedInfo.semaphore = Unwrap(unwrappedInfo.semaphore);
return ObjDisp(device)->ImportSemaphoreWin32HandleKHX(Unwrap(device), &unwrappedInfo);
return ObjDisp(device)->ImportSemaphoreWin32HandleKHR(Unwrap(device), &unwrappedInfo);
}
VkResult WrappedVulkan::vkGetSemaphoreWin32HandleKHX(VkDevice device, VkSemaphore semaphore,
VkExternalSemaphoreHandleTypeFlagBitsKHX handleType,
HANDLE *pHandle)
VkResult WrappedVulkan::vkGetSemaphoreWin32HandleKHR(
VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR *pGetWin32HandleInfo, HANDLE *pHandle)
{
return ObjDisp(device)->GetSemaphoreWin32HandleKHX(Unwrap(device), Unwrap(semaphore), handleType,
pHandle);
VkSemaphoreGetWin32HandleInfoKHR unwrappedInfo = *pGetWin32HandleInfo;
unwrappedInfo.semaphore = Unwrap(unwrappedInfo.semaphore);
return ObjDisp(device)->GetSemaphoreWin32HandleKHR(Unwrap(device), &unwrappedInfo, pHandle);
}
#endif