From 0eb915447a875454ea7ea212445dc8885234f4fc Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 20 Nov 2018 15:15:21 +0000 Subject: [PATCH] Handle all sType structures in serialisation, and next chain handling * In many cases these structs are redundant and currently aren't ever serialised directly or valid to be included in next chains. However it's better to take the hit now and implement this universally in case new structs are needed in future. It's easier to keep up with when new structs are added, and it means we have the compiler checking we've handled all structs and don't forget one. * There are some specific exceptions for structs that really need special handling and are just treated as if they're unsupported, on the assumption that any special handling will be implemented elsewhere. --- renderdoc/driver/vulkan/CMakeLists.txt | 1 + .../driver/vulkan/renderdoc_vulkan.vcxproj | 1 + .../vulkan/renderdoc_vulkan.vcxproj.filters | 3 + renderdoc/driver/vulkan/vk_common.cpp | 527 --- renderdoc/driver/vulkan/vk_common.h | 878 +++-- renderdoc/driver/vulkan/vk_next_chains.cpp | 1254 ++++++ renderdoc/driver/vulkan/vk_serialise.cpp | 3348 +++++++++++++++-- renderdoc/driver/vulkan/vk_stringise.cpp | 335 +- 8 files changed, 5098 insertions(+), 1249 deletions(-) create mode 100644 renderdoc/driver/vulkan/vk_next_chains.cpp diff --git a/renderdoc/driver/vulkan/CMakeLists.txt b/renderdoc/driver/vulkan/CMakeLists.txt index e3384b7a8..c91c08d9a 100644 --- a/renderdoc/driver/vulkan/CMakeLists.txt +++ b/renderdoc/driver/vulkan/CMakeLists.txt @@ -1,6 +1,7 @@ set(sources vk_common.cpp vk_common.h + vk_next_chains.cpp vk_core.cpp vk_core.h vk_counters.cpp diff --git a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj index 875ebb0e2..493187a18 100644 --- a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj +++ b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj @@ -105,6 +105,7 @@ true + diff --git a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters index f12e61217..ce8458a71 100644 --- a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters +++ b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters @@ -130,6 +130,9 @@ Util + + Util + diff --git a/renderdoc/driver/vulkan/vk_common.cpp b/renderdoc/driver/vulkan/vk_common.cpp index 9d6aac18e..feff16798 100644 --- a/renderdoc/driver/vulkan/vk_common.cpp +++ b/renderdoc/driver/vulkan/vk_common.cpp @@ -285,533 +285,6 @@ bool VkInitParams::IsSupportedVersion(uint64_t ver) return false; } -// utility function for when we're modifying one struct in a pNext chain, this -// lets us just copy across a struct unmodified into some temporary memory and -// append it onto a pNext chain we're building -template -void CopyNextChainedStruct(byte *&tempMem, const VkBaseInStructure *nextInput, - VkBaseInStructure *&nextChainTail) -{ - const VkStruct *instruct = (const VkStruct *)nextInput; - VkStruct *outstruct = (VkStruct *)tempMem; - - tempMem = (byte *)(outstruct + 1); - - // copy the struct, nothing to unwrap - *outstruct = *instruct; - - // default to NULL. It will be overwritten next time if there is a next object - outstruct->pNext = NULL; - - // append this onto the chain - nextChainTail->pNext = (const VkBaseInStructure *)outstruct; - nextChainTail = (VkBaseInStructure *)outstruct; -} - -// this is similar to the above function, but for use after we've modified a struct locally -// e.g. to unwrap some members or patch flags, etc. -template -void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct, - VkBaseInStructure *&nextChainTail) -{ - tempMem = (byte *)(outputStruct + 1); - - // default to NULL. It will be overwritten in the next step if there is a next object - outputStruct->pNext = NULL; - - // append this onto the chain - nextChainTail->pNext = (const VkBaseInStructure *)outputStruct; - nextChainTail = (VkBaseInStructure *)outputStruct; -} - -size_t GetNextPatchSize(const void *pNext) -{ - const VkBaseInStructure *next = (const VkBaseInStructure *)pNext; - size_t memSize = 0; - - while(next) - { - // VkMemoryAllocateInfo - if(next->sType == VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV) - memSize += sizeof(VkDedicatedAllocationMemoryAllocateInfoNV); - else if(next->sType == VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO) - memSize += sizeof(VkMemoryDedicatedAllocateInfo); - else if(next->sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO) - memSize += sizeof(VkMemoryAllocateFlagsInfo); - 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) - memSize += sizeof(VkExportMemoryAllocateInfo); - 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) - memSize += sizeof(VkExportMemoryWin32HandleInfoNV); - else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV) - memSize += sizeof(VkImportMemoryWin32HandleInfoNV); -#else - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV) - RDCERR("Support for VK_NV_external_memory_win32 not compiled in"); - else if(next->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV) - RDCERR("Support for VK_NV_external_memory_win32 not compiled in"); -#endif - -#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_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 - - // VkSamplerCreateInfo - else if(next->sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO) - memSize += sizeof(VkSamplerYcbcrConversionInfo); - else if(next->sType == VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT) - memSize += sizeof(VkSamplerReductionModeCreateInfoEXT); - - // VkSemaphoreCreateInfo - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO) - memSize += sizeof(VkExportSemaphoreCreateInfoKHR); -#ifdef VK_KHR_external_semaphore_win32 - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR) - memSize += sizeof(VkExportSemaphoreWin32HandleInfoKHR); -#else - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR) - RDCERR("Support for VK_KHR_external_memory_win32 not compiled in"); -#endif - - // VkFenceCreateInfo - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO) - memSize += sizeof(VkExportFenceCreateInfoKHR); -#ifdef VK_KHR_external_fence_win32 - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR) - memSize += sizeof(VkExportFenceWin32HandleInfoKHR); -#else - else if(next->sType == VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR) - RDCERR("Support for VK_KHR_external_memory_win32 not compiled in"); -#endif - - // VkImageCreateInfo - else if(next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO) - memSize += sizeof(VkExternalMemoryImageCreateInfo); - else if(next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV) - memSize += sizeof(VkExternalMemoryImageCreateInfoNV); - else if(next->sType == VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR) - memSize += sizeof(VkImageSwapchainCreateInfoKHR); - else if(next->sType == VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV) - memSize += sizeof(VkDedicatedAllocationImageCreateInfoNV); - else if(next->sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR) - memSize += sizeof(VkImageFormatListCreateInfoKHR); - - // VkBufferCreateInfo - else if(next->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO) - memSize += sizeof(VkExternalMemoryBufferCreateInfoKHR); - else if(next->sType == VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV) - memSize += sizeof(VkDedicatedAllocationBufferCreateInfoNV); - else if(next->sType == VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO) - memSize += sizeof(VkBindBufferMemoryDeviceGroupInfo); - - // VkBindImageMemoryInfo - else if(next->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR) - memSize += sizeof(VkBindImageMemorySwapchainInfoKHR); - else if(next->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO) - memSize += sizeof(VkBindImageMemoryDeviceGroupInfo); - else if(next->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO) - memSize += sizeof(VkBindImagePlaneMemoryInfo); - - // VkSwapchainCreateInfoKHR - else if(next->sType == VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT) - memSize += sizeof(VkSwapchainCounterCreateInfoEXT); - else if(next->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR) - memSize += sizeof(VkDeviceGroupSwapchainCreateInfoKHR); - - // VkDeviceQueueCreateInfo - else if(next->sType == VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT) - memSize += sizeof(VkDeviceQueueGlobalPriorityCreateInfoEXT); - - // VkSubmitInfo - else if(next->sType == VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO) - memSize += sizeof(VkProtectedSubmitInfo); - else if(next->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO) - memSize += sizeof(VkDeviceGroupSubmitInfo); - -#if defined(VK_KHR_win32_keyed_mutex) || defined(VK_NV_win32_keyed_mutex) - 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_KHR) - { - // the KHR and NV structs are identical - memSize += sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR); - - VkWin32KeyedMutexAcquireReleaseInfoKHR *info = (VkWin32KeyedMutexAcquireReleaseInfoKHR *)next; - memSize += info->acquireCount * sizeof(VkDeviceMemory); - memSize += info->releaseCount * sizeof(VkDeviceMemory); - } -#else - 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_KHR) - { - RDCERR("Support for VK_KHR_win32_keyed_mutex / VK_NV_win32_keyed_mutex not compiled in"); - } -#endif - - // VkBindSparseInfo - else if(next->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO) - memSize += sizeof(VkDeviceGroupBindSparseInfo); - - // VkCommandBufferBeginInfo - else if(next->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO) - memSize += sizeof(VkDeviceGroupCommandBufferBeginInfo); - - // VkRenderPassBeginInfo - else if(next->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO) - memSize += sizeof(VkDeviceGroupRenderPassBeginInfo); - - // VkShaderModuleCreateInfo - if(next->sType == VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT) - memSize += sizeof(VkValidationCacheCreateInfoEXT); - - next = next->pNext; - } - - return memSize; -} - -void UnwrapNextChain(CaptureState state, const char *structName, byte *&tempMem, - VkBaseInStructure *infoStruct) -{ - // during capture, this walks the pNext chain and either copies structs that can be passed - // straight through, or copies and modifies any with vulkan objects that need to be unwrapped. - // - // during replay, we do the same thing to prepare for dispatching to the driver, but we also strip - // out any structs we don't want to replay - e.g. external memory. This means the data is - // serialised and available for future use and for user inspection, but isn't replayed when not - // necesary. - - VkBaseInStructure *nextChainTail = infoStruct; - const VkBaseInStructure *nextInput = (const VkBaseInStructure *)infoStruct->pNext; - - // start with an empty chain. Every call to AppendModifiedChainedStruct / CopyNextChainedStruct - // pushes on a new entry, but if there's only one entry in the list and it's one we want to skip, - // this needs to start at NULL. - nextChainTail->pNext = NULL; - while(nextInput) - { - if(nextInput->sType == VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV || - nextInput->sType == VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO) - { - // KHR and NV structs are identical - const VkMemoryDedicatedAllocateInfo *dedicatedIn = - (const VkMemoryDedicatedAllocateInfo *)nextInput; - VkMemoryDedicatedAllocateInfo *dedicatedOut = (VkMemoryDedicatedAllocateInfo *)tempMem; - - // copy and unwrap the struct - dedicatedOut->sType = dedicatedIn->sType; - dedicatedOut->buffer = Unwrap(dedicatedIn->buffer); - dedicatedOut->image = Unwrap(dedicatedIn->image); - - // we replay this - AppendModifiedChainedStruct(tempMem, dedicatedOut, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR) - { -#ifdef VK_KHR_external_memory_win32 - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); -#else - RDCERR("Support for VK_KHR_external_memory_win32 not compiled in"); -#endif - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR) - { -#ifdef VK_KHR_external_memory_win32 - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); -#else - 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) - { -#ifdef VK_NV_external_memory_win32 - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); -#else - RDCERR("Support for VK_NV_external_memory_win32 not compiled in"); -#endif - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV) - { -#ifdef VK_NV_external_memory_win32 - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); -#else - RDCERR("Support for VK_NV_external_memory_win32 not compiled in"); -#endif - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO) - { - const VkSamplerYcbcrConversionInfo *ycbcrIn = (const VkSamplerYcbcrConversionInfo *)nextInput; - VkSamplerYcbcrConversionInfo *ycbcrOut = (VkSamplerYcbcrConversionInfo *)tempMem; - - // copy and unwrap the struct - ycbcrOut->sType = ycbcrIn->sType; - ycbcrOut->conversion = Unwrap(ycbcrIn->conversion); - - AppendModifiedChainedStruct(tempMem, ycbcrOut, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR) - { -#ifdef VK_KHR_external_semaphore_win32 - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); -#else - RDCERR("Support for VK_KHR_external_semaphore_win32 not compiled in"); -#endif - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR) - { -#ifdef VK_KHR_external_fence_win32 - - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); -#else - RDCERR("Support for VK_KHR_external_fence_win32 not compiled in"); -#endif - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR) - { - if(IsCaptureMode(state)) - { - const VkImageSwapchainCreateInfoKHR *swapIn = - (const VkImageSwapchainCreateInfoKHR *)nextInput; - VkImageSwapchainCreateInfoKHR *swapOut = (VkImageSwapchainCreateInfoKHR *)tempMem; - - // copy and unwrap the struct - swapOut->sType = swapIn->sType; - swapOut->swapchain = Unwrap(swapIn->swapchain); - - AppendModifiedChainedStruct(tempMem, swapOut, nextChainTail); - } - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV) - { - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV) - { - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR) - { - if(IsCaptureMode(state)) - { - const VkBindImageMemorySwapchainInfoKHR *swapIn = - (const VkBindImageMemorySwapchainInfoKHR *)nextInput; - VkBindImageMemorySwapchainInfoKHR *swapOut = (VkBindImageMemorySwapchainInfoKHR *)tempMem; - - // copy and unwrap the struct - swapOut->sType = swapIn->sType; - swapOut->swapchain = Unwrap(swapIn->swapchain); - - AppendModifiedChainedStruct(tempMem, swapOut, nextChainTail); - } - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT) - { - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV || - nextInput->sType == VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR) - { -#if defined(VK_KHR_win32_keyed_mutex) || defined(VK_NV_win32_keyed_mutex) - if(IsCaptureMode(state)) - { - // KHR and NV structs are identical - const VkWin32KeyedMutexAcquireReleaseInfoKHR *mutexIn = - (const VkWin32KeyedMutexAcquireReleaseInfoKHR *)nextInput; - VkWin32KeyedMutexAcquireReleaseInfoKHR *mutexOut = - (VkWin32KeyedMutexAcquireReleaseInfoKHR *)tempMem; - - // append immediately so tempMem is incremented - AppendModifiedChainedStruct(tempMem, mutexOut, nextChainTail); - - // copy sType and pointers we don't need to patch - mutexOut->sType = mutexIn->sType; - mutexOut->acquireCount = mutexIn->acquireCount; - mutexOut->pAcquireKeys = mutexIn->pAcquireKeys; - mutexOut->pAcquireTimeouts = mutexIn->pAcquireTimeouts; - mutexOut->releaseCount = mutexIn->releaseCount; - mutexOut->pReleaseKeys = mutexIn->pReleaseKeys; - - // allocate unwrapped arrays - VkDeviceMemory *unwrappedAcquires = (VkDeviceMemory *)tempMem; - tempMem += sizeof(VkDeviceMemory) * mutexIn->acquireCount; - VkDeviceMemory *unwrappedReleases = (VkDeviceMemory *)tempMem; - tempMem += sizeof(VkDeviceMemory) * mutexIn->releaseCount; - - // unwrap the arrays - for(uint32_t mem = 0; mem < mutexIn->acquireCount; mem++) - unwrappedAcquires[mem] = Unwrap(mutexIn->pAcquireSyncs[mem]); - for(uint32_t mem = 0; mem < mutexIn->releaseCount; mem++) - unwrappedReleases[mem] = Unwrap(mutexIn->pReleaseSyncs[mem]); - - mutexOut->pAcquireSyncs = unwrappedAcquires; - mutexOut->pReleaseSyncs = unwrappedReleases; - } -#else - RDCERR("Support for VK_KHR_win32_keyed_mutex / VK_NV_win32_keyed_mutex not compiled in"); -#endif - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else if(nextInput->sType == - VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT) - { - CopyNextChainedStruct( - tempMem, nextInput, nextChainTail); - } - else if(nextInput->sType == - VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO) - { - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT) - { - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else if(nextInput->sType == VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT) - { - if(IsCaptureMode(state)) - CopyNextChainedStruct(tempMem, nextInput, - nextChainTail); - } - else - { - RDCERR("unrecognised struct %d in %s pNext chain", nextInput->sType, structName); - // can't patch this struct, have to just copy it and hope it's the last in the chain - nextChainTail->pNext = nextInput; - } - - nextInput = nextInput->pNext; - } -} - VkAccessFlags MakeAccessMask(VkImageLayout layout) { switch(layout) diff --git a/renderdoc/driver/vulkan/vk_common.h b/renderdoc/driver/vulkan/vk_common.h index 1755c02c7..ab3eb4716 100644 --- a/renderdoc/driver/vulkan/vk_common.h +++ b/renderdoc/driver/vulkan/vk_common.h @@ -271,27 +271,30 @@ VkBaseInStructure *FindNextStruct(VkStruct *haystack, VkStructureType needle) template bool RemoveNextStruct(VkStruct *haystack, VkStructureType needle) { + bool ret = false; + // start from the haystack, and iterate VkBaseInStructure *root = (VkBaseInStructure *)haystack; while(root && root->pNext) { // at each point, if the *next* struct is the needle, then point our next pointer at whatever // its was - either the next in the chain or NULL if it was at the end. Then we can return true - // because we removed the struct (we assume no duplicates). + // because we removed the struct. We keep going to handle duplicates, but we continue and skip + // the list iterate as we now have a new root->pNext. // Note that this can't remove the first struct in the chain but that's expected, we only want // to remove extension structs. if(root->pNext->sType == needle) { root->pNext = root->pNext->pNext; - return true; + ret = true; + continue; } // move to the next struct root = (VkBaseInStructure *)root->pNext; } - // struct wasn't found, bail - return false; + return ret; } enum class MemoryScope : uint8_t @@ -547,350 +550,607 @@ SERIALISE_VK_HANDLES(); // declare reflect-able types -DECLARE_REFLECTION_STRUCT(VkAllocationCallbacks); -DECLARE_REFLECTION_STRUCT(VkOffset2D); -DECLARE_REFLECTION_STRUCT(VkExtent2D); -DECLARE_REFLECTION_STRUCT(VkMemoryType); -DECLARE_REFLECTION_STRUCT(VkMemoryHeap); -DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceLimits); -DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSparseProperties); -DECLARE_REFLECTION_STRUCT(VkQueueFamilyProperties); -DECLARE_REFLECTION_STRUCT(VkExtent3D); -DECLARE_REFLECTION_STRUCT(VkPipelineShaderStageCreateInfo); -DECLARE_REFLECTION_STRUCT(VkOffset3D); -DECLARE_REFLECTION_STRUCT(VkCommandBufferInheritanceInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineVertexInputStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkSparseBufferMemoryBindInfo); -DECLARE_REFLECTION_STRUCT(VkSparseImageOpaqueMemoryBindInfo); -DECLARE_REFLECTION_STRUCT(VkSparseImageMemoryBindInfo); -DECLARE_REFLECTION_STRUCT(VkAttachmentDescription); -DECLARE_REFLECTION_STRUCT(VkSubpassDescription); -DECLARE_REFLECTION_STRUCT(VkSubpassDependency); -DECLARE_REFLECTION_STRUCT(VkClearValue); -DECLARE_REFLECTION_STRUCT(VkClearColorValue); -DECLARE_REFLECTION_STRUCT(VkClearDepthStencilValue); -DECLARE_REFLECTION_STRUCT(VkClearAttachment); -DECLARE_REFLECTION_STRUCT(VkClearRect); -DECLARE_REFLECTION_STRUCT(VkViewport); -DECLARE_REFLECTION_STRUCT(VkPipelineColorBlendAttachmentState); -DECLARE_REFLECTION_STRUCT(VkDescriptorPoolSize); -DECLARE_REFLECTION_STRUCT(VkDescriptorImageInfo); -DECLARE_REFLECTION_STRUCT(VkDescriptorBufferInfo); -DECLARE_REFLECTION_STRUCT(VkSpecializationInfo); -DECLARE_REFLECTION_STRUCT(VkAttachmentReference); -DECLARE_REFLECTION_STRUCT(VkSparseImageMemoryBind); -DECLARE_REFLECTION_STRUCT(VkVertexInputBindingDescription); -DECLARE_REFLECTION_STRUCT(VkVertexInputAttributeDescription); -DECLARE_REFLECTION_STRUCT(VkSpecializationMapEntry); -DECLARE_REFLECTION_STRUCT(VkRect2D); -DECLARE_REFLECTION_STRUCT(VkDeviceQueueCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceFeatures); -DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryProperties); -DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceProperties); -DECLARE_REFLECTION_STRUCT(VkDeviceCreateInfo); -DECLARE_REFLECTION_STRUCT(VkBufferCreateInfo); -DECLARE_REFLECTION_STRUCT(VkBufferViewCreateInfo); -DECLARE_REFLECTION_STRUCT(VkImageCreateInfo); -DECLARE_REFLECTION_STRUCT(VkMemoryRequirements); -DECLARE_REFLECTION_STRUCT(VkImageViewCreateInfo); -DECLARE_REFLECTION_STRUCT(VkSparseMemoryBind); +// pNext structs - always have deserialise for the next chain +DECLARE_REFLECTION_STRUCT(VkAcquireNextImageInfoKHR); +DECLARE_REFLECTION_STRUCT(VkApplicationInfo); +DECLARE_REFLECTION_STRUCT(VkAttachmentDescription2KHR); +DECLARE_REFLECTION_STRUCT(VkAttachmentReference2KHR); +DECLARE_REFLECTION_STRUCT(VkBindBufferMemoryDeviceGroupInfo); +DECLARE_REFLECTION_STRUCT(VkBindBufferMemoryInfo); +DECLARE_REFLECTION_STRUCT(VkBindImageMemoryDeviceGroupInfo); +DECLARE_REFLECTION_STRUCT(VkBindImageMemoryInfo); +DECLARE_REFLECTION_STRUCT(VkBindImageMemorySwapchainInfoKHR); +DECLARE_REFLECTION_STRUCT(VkBindImagePlaneMemoryInfo); DECLARE_REFLECTION_STRUCT(VkBindSparseInfo); -DECLARE_REFLECTION_STRUCT(VkSubmitInfo); -DECLARE_REFLECTION_STRUCT(VkFramebufferCreateInfo); -DECLARE_REFLECTION_STRUCT(VkRenderPassCreateInfo); -DECLARE_REFLECTION_STRUCT(VkRenderPassBeginInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineInputAssemblyStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineTessellationStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineViewportStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineMultisampleStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineDepthStencilStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineColorBlendStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineDynamicStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineLayoutCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPushConstantRange); -DECLARE_REFLECTION_STRUCT(VkDescriptorSetLayoutBinding); -DECLARE_REFLECTION_STRUCT(VkDescriptorSetLayoutCreateInfo); -DECLARE_REFLECTION_STRUCT(VkDescriptorPoolCreateInfo); -DECLARE_REFLECTION_STRUCT(VkDescriptorSetAllocateInfo); -DECLARE_REFLECTION_STRUCT(VkWriteDescriptorSet); -DECLARE_REFLECTION_STRUCT(VkCopyDescriptorSet); -DECLARE_REFLECTION_STRUCT(VkCommandPoolCreateInfo); +DECLARE_REFLECTION_STRUCT(VkBufferCreateInfo); +DECLARE_REFLECTION_STRUCT(VkBufferMemoryBarrier); +DECLARE_REFLECTION_STRUCT(VkBufferMemoryRequirementsInfo2); +DECLARE_REFLECTION_STRUCT(VkBufferViewCreateInfo); DECLARE_REFLECTION_STRUCT(VkCommandBufferAllocateInfo); DECLARE_REFLECTION_STRUCT(VkCommandBufferBeginInfo); -DECLARE_REFLECTION_STRUCT(VkStencilOpState); -DECLARE_REFLECTION_STRUCT(VkQueryPoolCreateInfo); -DECLARE_REFLECTION_STRUCT(VkSemaphoreCreateInfo); +DECLARE_REFLECTION_STRUCT(VkCommandBufferInheritanceInfo); +DECLARE_REFLECTION_STRUCT(VkCommandPoolCreateInfo); +DECLARE_REFLECTION_STRUCT(VkComputePipelineCreateInfo); +DECLARE_REFLECTION_STRUCT(VkCopyDescriptorSet); +DECLARE_REFLECTION_STRUCT(VkDebugMarkerMarkerInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDebugMarkerObjectNameInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDebugMarkerObjectTagInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDebugReportCallbackCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDebugUtilsLabelEXT); +DECLARE_REFLECTION_STRUCT(VkDebugUtilsMessengerCallbackDataEXT); +DECLARE_REFLECTION_STRUCT(VkDebugUtilsMessengerCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDebugUtilsObjectNameInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDebugUtilsObjectTagInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDedicatedAllocationBufferCreateInfoNV); +DECLARE_REFLECTION_STRUCT(VkDedicatedAllocationImageCreateInfoNV); +DECLARE_REFLECTION_STRUCT(VkDedicatedAllocationMemoryAllocateInfoNV); +DECLARE_REFLECTION_STRUCT(VkDescriptorPoolCreateInfo); +DECLARE_REFLECTION_STRUCT(VkDescriptorSetAllocateInfo); +DECLARE_REFLECTION_STRUCT(VkDescriptorSetLayoutCreateInfo); +DECLARE_REFLECTION_STRUCT(VkDescriptorSetLayoutSupport); +DECLARE_REFLECTION_STRUCT(VkDescriptorUpdateTemplateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceCreateInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceEventInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupBindSparseInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupCommandBufferBeginInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupDeviceCreateInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupPresentCapabilitiesKHR); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupPresentInfoKHR); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupRenderPassBeginInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupSubmitInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceGroupSwapchainCreateInfoKHR); +DECLARE_REFLECTION_STRUCT(VkDeviceQueueCreateInfo); +DECLARE_REFLECTION_STRUCT(VkDeviceQueueGlobalPriorityCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDeviceQueueInfo2); +DECLARE_REFLECTION_STRUCT(VkDisplayEventInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDisplayModeProperties2KHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPlaneCapabilities2KHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPlaneInfo2KHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPlaneProperties2KHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPowerInfoEXT); +DECLARE_REFLECTION_STRUCT(VkDisplayPresentInfoKHR); +DECLARE_REFLECTION_STRUCT(VkDisplayProperties2KHR); DECLARE_REFLECTION_STRUCT(VkEventCreateInfo); +DECLARE_REFLECTION_STRUCT(VkExportFenceCreateInfo); +DECLARE_REFLECTION_STRUCT(VkExportMemoryAllocateInfo); +DECLARE_REFLECTION_STRUCT(VkExportMemoryAllocateInfoNV); +DECLARE_REFLECTION_STRUCT(VkExportSemaphoreCreateInfo); +DECLARE_REFLECTION_STRUCT(VkExternalBufferProperties); +DECLARE_REFLECTION_STRUCT(VkExternalFenceProperties); +DECLARE_REFLECTION_STRUCT(VkExternalImageFormatProperties); +DECLARE_REFLECTION_STRUCT(VkExternalMemoryBufferCreateInfo); +DECLARE_REFLECTION_STRUCT(VkExternalMemoryImageCreateInfo); +DECLARE_REFLECTION_STRUCT(VkExternalMemoryImageCreateInfoNV); +DECLARE_REFLECTION_STRUCT(VkExternalSemaphoreProperties); DECLARE_REFLECTION_STRUCT(VkFenceCreateInfo); -DECLARE_REFLECTION_STRUCT(VkSamplerCreateInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineCacheCreateInfo); -DECLARE_REFLECTION_STRUCT(VkShaderModuleCreateInfo); -DECLARE_REFLECTION_STRUCT(VkImageSubresourceRange); -DECLARE_REFLECTION_STRUCT(VkImageSubresource); -DECLARE_REFLECTION_STRUCT(VkImageSubresourceLayers); +DECLARE_REFLECTION_STRUCT(VkFenceGetFdInfoKHR); +DECLARE_REFLECTION_STRUCT(VkFormatProperties2); +DECLARE_REFLECTION_STRUCT(VkFramebufferCreateInfo); +DECLARE_REFLECTION_STRUCT(VkGraphicsPipelineCreateInfo); +DECLARE_REFLECTION_STRUCT(VkImageCreateInfo); +DECLARE_REFLECTION_STRUCT(VkImageFormatListCreateInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImageFormatProperties2); +DECLARE_REFLECTION_STRUCT(VkImageMemoryBarrier); +DECLARE_REFLECTION_STRUCT(VkImageMemoryRequirementsInfo2); +DECLARE_REFLECTION_STRUCT(VkImagePlaneMemoryRequirementsInfo); +DECLARE_REFLECTION_STRUCT(VkImageSparseMemoryRequirementsInfo2); +DECLARE_REFLECTION_STRUCT(VkImageSwapchainCreateInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImageViewASTCDecodeModeEXT); +DECLARE_REFLECTION_STRUCT(VkImageViewCreateInfo); +DECLARE_REFLECTION_STRUCT(VkImageViewUsageCreateInfo); +DECLARE_REFLECTION_STRUCT(VkImportFenceFdInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImportMemoryFdInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImportSemaphoreFdInfoKHR); +DECLARE_REFLECTION_STRUCT(VkInstanceCreateInfo); +DECLARE_REFLECTION_STRUCT(VkLayerDeviceCreateInfo); +DECLARE_REFLECTION_STRUCT(VkLayerInstanceCreateInfo); +DECLARE_REFLECTION_STRUCT(VkMappedMemoryRange); +DECLARE_REFLECTION_STRUCT(VkMemoryAllocateFlagsInfo); DECLARE_REFLECTION_STRUCT(VkMemoryAllocateInfo); DECLARE_REFLECTION_STRUCT(VkMemoryBarrier); -DECLARE_REFLECTION_STRUCT(VkBufferMemoryBarrier); -DECLARE_REFLECTION_STRUCT(VkImageMemoryBarrier); -DECLARE_REFLECTION_STRUCT(VkGraphicsPipelineCreateInfo); -DECLARE_REFLECTION_STRUCT(VkComputePipelineCreateInfo); -DECLARE_REFLECTION_STRUCT(VkComponentMapping); -DECLARE_REFLECTION_STRUCT(VkMappedMemoryRange); -DECLARE_REFLECTION_STRUCT(VkBufferImageCopy); -DECLARE_REFLECTION_STRUCT(VkBufferCopy); -DECLARE_REFLECTION_STRUCT(VkImageCopy); -DECLARE_REFLECTION_STRUCT(VkImageBlit); -DECLARE_REFLECTION_STRUCT(VkImageResolve); -DECLARE_REFLECTION_STRUCT(VkSwapchainCreateInfoKHR); -DECLARE_REFLECTION_STRUCT(VkDebugMarkerMarkerInfoEXT); -DECLARE_REFLECTION_STRUCT(VkDescriptorUpdateTemplateEntry); -DECLARE_REFLECTION_STRUCT(VkDescriptorUpdateTemplateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkBindBufferMemoryInfo); -DECLARE_REFLECTION_STRUCT(VkBindImageMemoryInfo); -DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationConservativeStateCreateInfoEXT); -DECLARE_REFLECTION_STRUCT(VkPipelineTessellationDomainOriginStateCreateInfo); -DECLARE_REFLECTION_STRUCT(VkImageViewUsageCreateInfo); -DECLARE_REFLECTION_STRUCT(VkInputAttachmentAspectReference); -DECLARE_REFLECTION_STRUCT(VkRenderPassInputAttachmentAspectCreateInfo); -DECLARE_REFLECTION_STRUCT(VkVertexInputBindingDivisorDescriptionEXT); -DECLARE_REFLECTION_STRUCT(VkPipelineVertexInputDivisorStateCreateInfoEXT); -DECLARE_REFLECTION_STRUCT(VkSamplerReductionModeCreateInfoEXT); -DECLARE_REFLECTION_STRUCT(VkDebugUtilsLabelEXT); -DECLARE_REFLECTION_STRUCT(VkSamplerYcbcrConversionCreateInfo); -DECLARE_REFLECTION_STRUCT(VkRenderPassMultiviewCreateInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceQueueInfo2); -DECLARE_REFLECTION_STRUCT(VkExportMemoryAllocateInfoNV); -DECLARE_REFLECTION_STRUCT(VkExternalMemoryImageCreateInfoNV); -DECLARE_REFLECTION_STRUCT(VkExternalMemoryImageCreateInfo); -DECLARE_REFLECTION_STRUCT(VkExportMemoryAllocateInfo); -DECLARE_REFLECTION_STRUCT(VkExternalMemoryBufferCreateInfo); -DECLARE_REFLECTION_STRUCT(VkImportMemoryFdInfoKHR); -DECLARE_REFLECTION_STRUCT(VkExportSemaphoreCreateInfo); -DECLARE_REFLECTION_STRUCT(VkExportFenceCreateInfo); -DECLARE_REFLECTION_STRUCT(VkSwapchainCounterCreateInfoEXT); -DECLARE_REFLECTION_STRUCT(VkDedicatedAllocationMemoryAllocateInfoNV); -DECLARE_REFLECTION_STRUCT(VkDedicatedAllocationImageCreateInfoNV); -DECLARE_REFLECTION_STRUCT(VkDedicatedAllocationBufferCreateInfoNV); DECLARE_REFLECTION_STRUCT(VkMemoryDedicatedAllocateInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceQueueGlobalPriorityCreateInfoEXT); -DECLARE_REFLECTION_STRUCT(VkBindImagePlaneMemoryInfo); -DECLARE_REFLECTION_STRUCT(VkSamplerYcbcrConversionInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceGroupSwapchainCreateInfoKHR); -DECLARE_REFLECTION_STRUCT(VkBindImageMemorySwapchainInfoKHR); -DECLARE_REFLECTION_STRUCT(VkImageSwapchainCreateInfoKHR); -DECLARE_REFLECTION_STRUCT(VkBindImageMemoryDeviceGroupInfo); -DECLARE_REFLECTION_STRUCT(VkBindBufferMemoryDeviceGroupInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceGroupBindSparseInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceGroupSubmitInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceGroupCommandBufferBeginInfo); -DECLARE_REFLECTION_STRUCT(VkDeviceGroupRenderPassBeginInfo); -DECLARE_REFLECTION_STRUCT(VkMemoryAllocateFlagsInfo); -DECLARE_REFLECTION_STRUCT(VkProtectedSubmitInfo); -DECLARE_REFLECTION_STRUCT(VkImageFormatListCreateInfoKHR); -DECLARE_REFLECTION_STRUCT(VkImageViewASTCDecodeModeEXT); -DECLARE_REFLECTION_STRUCT(VkShaderModuleValidationCacheCreateInfoEXT); -DECLARE_REFLECTION_STRUCT(VkAttachmentDescription2KHR); -DECLARE_REFLECTION_STRUCT(VkSubpassDescription2KHR); -DECLARE_REFLECTION_STRUCT(VkSubpassDependency2KHR); -DECLARE_REFLECTION_STRUCT(VkAttachmentReference2KHR); -DECLARE_REFLECTION_STRUCT(VkRenderPassCreateInfo2KHR); -DECLARE_REFLECTION_STRUCT(VkSubpassBeginInfoKHR); -DECLARE_REFLECTION_STRUCT(VkSubpassEndInfoKHR); -DECLARE_REFLECTION_STRUCT(VkDispatchIndirectCommand); -DECLARE_REFLECTION_STRUCT(VkDrawIndirectCommand); -DECLARE_REFLECTION_STRUCT(VkDrawIndexedIndirectCommand); +DECLARE_REFLECTION_STRUCT(VkMemoryDedicatedRequirements); +DECLARE_REFLECTION_STRUCT(VkMemoryFdPropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkMemoryGetFdInfoKHR); +DECLARE_REFLECTION_STRUCT(VkMemoryRequirements2); +DECLARE_REFLECTION_STRUCT(VkPhysicalDevice16BitStorageFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDevice8BitStorageFeaturesKHR); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceASTCDecodeFeaturesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceDriverPropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceExternalBufferInfo); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceExternalFenceInfo); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceExternalImageFormatInfo); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceExternalSemaphoreInfo); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceFeatures2); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceGroupProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceIDProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceImageFormatInfo2); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMaintenance3Properties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryProperties2); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMultiviewFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMultiviewProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePCIBusInfoPropertiesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePointClippingProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceProperties2); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceProtectedMemoryFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceProtectedMemoryProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDevicePushDescriptorPropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSamplerYcbcrConversionFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceShaderAtomicInt64FeaturesKHR); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceShaderCorePropertiesAMD); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceShaderDrawParameterFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSparseImageFormatInfo2); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSubgroupProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSurfaceInfo2KHR); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceTransformFeedbackFeaturesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceTransformFeedbackPropertiesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceVariablePointerFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceVulkanMemoryModelFeaturesKHR); +DECLARE_REFLECTION_STRUCT(VkPipelineCacheCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineColorBlendStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineDepthStencilStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineDynamicStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineInputAssemblyStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineLayoutCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineMultisampleStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationConservativeStateCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationStateCreateInfo); DECLARE_REFLECTION_STRUCT(VkPipelineRasterizationStateStreamCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkPipelineShaderStageCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineTessellationDomainOriginStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineTessellationStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineVertexInputDivisorStateCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkPipelineVertexInputStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPipelineViewportStateCreateInfo); +DECLARE_REFLECTION_STRUCT(VkPresentInfoKHR); +DECLARE_REFLECTION_STRUCT(VkPresentRegionsKHR); +DECLARE_REFLECTION_STRUCT(VkProtectedSubmitInfo); +DECLARE_REFLECTION_STRUCT(VkQueryPoolCreateInfo); +DECLARE_REFLECTION_STRUCT(VkQueueFamilyProperties2); +DECLARE_REFLECTION_STRUCT(VkRenderPassBeginInfo); +DECLARE_REFLECTION_STRUCT(VkRenderPassCreateInfo); +DECLARE_REFLECTION_STRUCT(VkRenderPassCreateInfo2KHR); +DECLARE_REFLECTION_STRUCT(VkRenderPassInputAttachmentAspectCreateInfo); +DECLARE_REFLECTION_STRUCT(VkRenderPassMultiviewCreateInfo); +DECLARE_REFLECTION_STRUCT(VkSamplerCreateInfo); +DECLARE_REFLECTION_STRUCT(VkSamplerReductionModeCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkSamplerYcbcrConversionCreateInfo); +DECLARE_REFLECTION_STRUCT(VkSamplerYcbcrConversionImageFormatProperties); +DECLARE_REFLECTION_STRUCT(VkSamplerYcbcrConversionInfo); +DECLARE_REFLECTION_STRUCT(VkSemaphoreCreateInfo); +DECLARE_REFLECTION_STRUCT(VkSemaphoreGetFdInfoKHR); +DECLARE_REFLECTION_STRUCT(VkShaderModuleCreateInfo); +DECLARE_REFLECTION_STRUCT(VkShaderModuleValidationCacheCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkSharedPresentSurfaceCapabilitiesKHR); +DECLARE_REFLECTION_STRUCT(VkSparseImageFormatProperties2); +DECLARE_REFLECTION_STRUCT(VkSparseImageMemoryRequirements2); +DECLARE_REFLECTION_STRUCT(VkSubmitInfo); +DECLARE_REFLECTION_STRUCT(VkSubpassBeginInfoKHR); +DECLARE_REFLECTION_STRUCT(VkSubpassDependency2KHR); +DECLARE_REFLECTION_STRUCT(VkSubpassDescription2KHR); +DECLARE_REFLECTION_STRUCT(VkSubpassEndInfoKHR); +DECLARE_REFLECTION_STRUCT(VkSurfaceCapabilities2EXT); +DECLARE_REFLECTION_STRUCT(VkSurfaceCapabilities2KHR); +DECLARE_REFLECTION_STRUCT(VkSurfaceFormat2KHR); +DECLARE_REFLECTION_STRUCT(VkSwapchainCounterCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkSwapchainCreateInfoKHR); +DECLARE_REFLECTION_STRUCT(VkTextureLODGatherFormatPropertiesAMD); +DECLARE_REFLECTION_STRUCT(VkValidationCacheCreateInfoEXT); +DECLARE_REFLECTION_STRUCT(VkValidationFlagsEXT); +DECLARE_REFLECTION_STRUCT(VkWriteDescriptorSet); -DECLARE_DESERIALISE_TYPE(VkDeviceCreateInfo); -DECLARE_DESERIALISE_TYPE(VkBufferCreateInfo); -DECLARE_DESERIALISE_TYPE(VkBufferViewCreateInfo); -DECLARE_DESERIALISE_TYPE(VkImageCreateInfo); -DECLARE_DESERIALISE_TYPE(VkImageViewCreateInfo); +DECLARE_DESERIALISE_TYPE(VkAcquireNextImageInfoKHR); +DECLARE_DESERIALISE_TYPE(VkApplicationInfo); +DECLARE_DESERIALISE_TYPE(VkAttachmentDescription2KHR); +DECLARE_DESERIALISE_TYPE(VkAttachmentReference2KHR); +DECLARE_DESERIALISE_TYPE(VkBindBufferMemoryDeviceGroupInfo); +DECLARE_DESERIALISE_TYPE(VkBindBufferMemoryInfo); +DECLARE_DESERIALISE_TYPE(VkBindImageMemoryDeviceGroupInfo); +DECLARE_DESERIALISE_TYPE(VkBindImageMemoryInfo); +DECLARE_DESERIALISE_TYPE(VkBindImageMemorySwapchainInfoKHR); +DECLARE_DESERIALISE_TYPE(VkBindImagePlaneMemoryInfo); DECLARE_DESERIALISE_TYPE(VkBindSparseInfo); -DECLARE_DESERIALISE_TYPE(VkSubmitInfo); -DECLARE_DESERIALISE_TYPE(VkDescriptorSetAllocateInfo); -DECLARE_DESERIALISE_TYPE(VkFramebufferCreateInfo); -DECLARE_DESERIALISE_TYPE(VkRenderPassCreateInfo); -DECLARE_DESERIALISE_TYPE(VkRenderPassBeginInfo); -DECLARE_DESERIALISE_TYPE(VkCommandBufferBeginInfo); -DECLARE_DESERIALISE_TYPE(VkCommandPoolCreateInfo); +DECLARE_DESERIALISE_TYPE(VkBufferCreateInfo); +DECLARE_DESERIALISE_TYPE(VkBufferMemoryBarrier); +DECLARE_DESERIALISE_TYPE(VkBufferMemoryRequirementsInfo2); +DECLARE_DESERIALISE_TYPE(VkBufferViewCreateInfo); DECLARE_DESERIALISE_TYPE(VkCommandBufferAllocateInfo); -DECLARE_DESERIALISE_TYPE(VkPipelineCacheCreateInfo); -DECLARE_DESERIALISE_TYPE(VkPipelineLayoutCreateInfo); -DECLARE_DESERIALISE_TYPE(VkShaderModuleCreateInfo); -DECLARE_DESERIALISE_TYPE(VkGraphicsPipelineCreateInfo); +DECLARE_DESERIALISE_TYPE(VkCommandBufferBeginInfo); +DECLARE_DESERIALISE_TYPE(VkCommandBufferInheritanceInfo); +DECLARE_DESERIALISE_TYPE(VkCommandPoolCreateInfo); DECLARE_DESERIALISE_TYPE(VkComputePipelineCreateInfo); +DECLARE_DESERIALISE_TYPE(VkCopyDescriptorSet); +DECLARE_DESERIALISE_TYPE(VkDebugMarkerMarkerInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDebugMarkerObjectNameInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDebugMarkerObjectTagInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDebugReportCallbackCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDebugUtilsLabelEXT); +DECLARE_DESERIALISE_TYPE(VkDebugUtilsMessengerCallbackDataEXT); +DECLARE_DESERIALISE_TYPE(VkDebugUtilsMessengerCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDebugUtilsObjectNameInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDebugUtilsObjectTagInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDedicatedAllocationBufferCreateInfoNV); +DECLARE_DESERIALISE_TYPE(VkDedicatedAllocationImageCreateInfoNV); +DECLARE_DESERIALISE_TYPE(VkDedicatedAllocationMemoryAllocateInfoNV); DECLARE_DESERIALISE_TYPE(VkDescriptorPoolCreateInfo); -DECLARE_DESERIALISE_TYPE(VkQueryPoolCreateInfo); -DECLARE_DESERIALISE_TYPE(VkSemaphoreCreateInfo); +DECLARE_DESERIALISE_TYPE(VkDescriptorSetAllocateInfo); +DECLARE_DESERIALISE_TYPE(VkDescriptorSetLayoutCreateInfo); +DECLARE_DESERIALISE_TYPE(VkDescriptorSetLayoutSupport); +DECLARE_DESERIALISE_TYPE(VkDescriptorUpdateTemplateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceCreateInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceEventInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupBindSparseInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupCommandBufferBeginInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupDeviceCreateInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupPresentCapabilitiesKHR); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupPresentInfoKHR); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupSubmitInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR); +DECLARE_DESERIALISE_TYPE(VkDeviceQueueCreateInfo); +DECLARE_DESERIALISE_TYPE(VkDeviceQueueGlobalPriorityCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDeviceQueueInfo2); +DECLARE_DESERIALISE_TYPE(VkDisplayEventInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDisplayModeProperties2KHR); +DECLARE_DESERIALISE_TYPE(VkDisplayPlaneCapabilities2KHR); +DECLARE_DESERIALISE_TYPE(VkDisplayPlaneInfo2KHR); +DECLARE_DESERIALISE_TYPE(VkDisplayPlaneProperties2KHR); +DECLARE_DESERIALISE_TYPE(VkDisplayPowerInfoEXT); +DECLARE_DESERIALISE_TYPE(VkDisplayPresentInfoKHR); +DECLARE_DESERIALISE_TYPE(VkDisplayProperties2KHR); DECLARE_DESERIALISE_TYPE(VkEventCreateInfo); +DECLARE_DESERIALISE_TYPE(VkExportFenceCreateInfo); +DECLARE_DESERIALISE_TYPE(VkExportMemoryAllocateInfo); +DECLARE_DESERIALISE_TYPE(VkExportMemoryAllocateInfoNV); +DECLARE_DESERIALISE_TYPE(VkExportSemaphoreCreateInfo); +DECLARE_DESERIALISE_TYPE(VkExternalBufferProperties); +DECLARE_DESERIALISE_TYPE(VkExternalFenceProperties); +DECLARE_DESERIALISE_TYPE(VkExternalImageFormatProperties); +DECLARE_DESERIALISE_TYPE(VkExternalMemoryBufferCreateInfo); +DECLARE_DESERIALISE_TYPE(VkExternalMemoryImageCreateInfo); +DECLARE_DESERIALISE_TYPE(VkExternalMemoryImageCreateInfoNV); +DECLARE_DESERIALISE_TYPE(VkExternalSemaphoreProperties); DECLARE_DESERIALISE_TYPE(VkFenceCreateInfo); -DECLARE_DESERIALISE_TYPE(VkSamplerCreateInfo); +DECLARE_DESERIALISE_TYPE(VkFenceGetFdInfoKHR); +DECLARE_DESERIALISE_TYPE(VkFormatProperties2); +DECLARE_DESERIALISE_TYPE(VkFramebufferCreateInfo); +DECLARE_DESERIALISE_TYPE(VkGraphicsPipelineCreateInfo); +DECLARE_DESERIALISE_TYPE(VkImageCreateInfo); +DECLARE_DESERIALISE_TYPE(VkImageFormatListCreateInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImageFormatProperties2); +DECLARE_DESERIALISE_TYPE(VkImageMemoryBarrier); +DECLARE_DESERIALISE_TYPE(VkImageMemoryRequirementsInfo2); +DECLARE_DESERIALISE_TYPE(VkImagePlaneMemoryRequirementsInfo); +DECLARE_DESERIALISE_TYPE(VkImageSparseMemoryRequirementsInfo2); +DECLARE_DESERIALISE_TYPE(VkImageSwapchainCreateInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImageViewASTCDecodeModeEXT); +DECLARE_DESERIALISE_TYPE(VkImageViewCreateInfo); +DECLARE_DESERIALISE_TYPE(VkImageViewUsageCreateInfo); +DECLARE_DESERIALISE_TYPE(VkImportFenceFdInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImportMemoryFdInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImportSemaphoreFdInfoKHR); +DECLARE_DESERIALISE_TYPE(VkInstanceCreateInfo); +DECLARE_DESERIALISE_TYPE(VkLayerDeviceCreateInfo); +DECLARE_DESERIALISE_TYPE(VkLayerInstanceCreateInfo); +DECLARE_DESERIALISE_TYPE(VkMappedMemoryRange); +DECLARE_DESERIALISE_TYPE(VkMemoryAllocateFlagsInfo); DECLARE_DESERIALISE_TYPE(VkMemoryAllocateInfo); DECLARE_DESERIALISE_TYPE(VkMemoryBarrier); -DECLARE_DESERIALISE_TYPE(VkBufferMemoryBarrier); -DECLARE_DESERIALISE_TYPE(VkImageMemoryBarrier); -DECLARE_DESERIALISE_TYPE(VkWriteDescriptorSet); -DECLARE_DESERIALISE_TYPE(VkCopyDescriptorSet); -DECLARE_DESERIALISE_TYPE(VkDescriptorSetLayoutCreateInfo); -DECLARE_DESERIALISE_TYPE(VkDescriptorUpdateTemplateCreateInfo); -DECLARE_DESERIALISE_TYPE(VkMappedMemoryRange); -DECLARE_DESERIALISE_TYPE(VkSwapchainCreateInfoKHR); -DECLARE_DESERIALISE_TYPE(VkDebugMarkerMarkerInfoEXT); -DECLARE_DESERIALISE_TYPE(VkBindBufferMemoryInfo); -DECLARE_DESERIALISE_TYPE(VkBindImageMemoryInfo); -DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationConservativeStateCreateInfoEXT); -DECLARE_DESERIALISE_TYPE(VkPipelineTessellationDomainOriginStateCreateInfo); -DECLARE_DESERIALISE_TYPE(VkImageViewUsageCreateInfo); -DECLARE_DESERIALISE_TYPE(VkRenderPassInputAttachmentAspectCreateInfo); -DECLARE_DESERIALISE_TYPE(VkPipelineVertexInputDivisorStateCreateInfoEXT); -DECLARE_DESERIALISE_TYPE(VkSamplerReductionModeCreateInfoEXT); -DECLARE_DESERIALISE_TYPE(VkDebugUtilsLabelEXT); -DECLARE_DESERIALISE_TYPE(VkSamplerYcbcrConversionCreateInfo); -DECLARE_DESERIALISE_TYPE(VkRenderPassMultiviewCreateInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceQueueInfo2); -DECLARE_DESERIALISE_TYPE(VkExportMemoryAllocateInfoNV); -DECLARE_DESERIALISE_TYPE(VkExternalMemoryImageCreateInfoNV); -DECLARE_DESERIALISE_TYPE(VkExportMemoryAllocateInfo); -DECLARE_DESERIALISE_TYPE(VkExternalMemoryBufferCreateInfo); -DECLARE_DESERIALISE_TYPE(VkImportMemoryFdInfoKHR); -DECLARE_DESERIALISE_TYPE(VkExportSemaphoreCreateInfo); -DECLARE_DESERIALISE_TYPE(VkExportFenceCreateInfo); -DECLARE_DESERIALISE_TYPE(VkSwapchainCounterCreateInfoEXT); -DECLARE_DESERIALISE_TYPE(VkDedicatedAllocationMemoryAllocateInfoNV); -DECLARE_DESERIALISE_TYPE(VkDedicatedAllocationImageCreateInfoNV); -DECLARE_DESERIALISE_TYPE(VkDedicatedAllocationBufferCreateInfoNV); DECLARE_DESERIALISE_TYPE(VkMemoryDedicatedAllocateInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceQueueGlobalPriorityCreateInfoEXT); -DECLARE_DESERIALISE_TYPE(VkBindImagePlaneMemoryInfo); -DECLARE_DESERIALISE_TYPE(VkSamplerYcbcrConversionInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR); -DECLARE_DESERIALISE_TYPE(VkBindImageMemorySwapchainInfoKHR); -DECLARE_DESERIALISE_TYPE(VkImageSwapchainCreateInfoKHR); -DECLARE_DESERIALISE_TYPE(VkBindImageMemoryDeviceGroupInfo); -DECLARE_DESERIALISE_TYPE(VkBindBufferMemoryDeviceGroupInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceGroupBindSparseInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceGroupSubmitInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceGroupCommandBufferBeginInfo); -DECLARE_DESERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo); -DECLARE_DESERIALISE_TYPE(VkMemoryAllocateFlagsInfo); -DECLARE_DESERIALISE_TYPE(VkProtectedSubmitInfo); -DECLARE_DESERIALISE_TYPE(VkImageFormatListCreateInfoKHR); -DECLARE_DESERIALISE_TYPE(VkRenderPassCreateInfo2KHR); -DECLARE_DESERIALISE_TYPE(VkSubpassBeginInfoKHR); -DECLARE_DESERIALISE_TYPE(VkSubpassEndInfoKHR); +DECLARE_DESERIALISE_TYPE(VkMemoryDedicatedRequirements); +DECLARE_DESERIALISE_TYPE(VkMemoryFdPropertiesKHR); +DECLARE_DESERIALISE_TYPE(VkMemoryGetFdInfoKHR); +DECLARE_DESERIALISE_TYPE(VkMemoryRequirements2); +DECLARE_DESERIALISE_TYPE(VkPhysicalDevice16BitStorageFeatures); +DECLARE_DESERIALISE_TYPE(VkPhysicalDevice8BitStorageFeaturesKHR); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceASTCDecodeFeaturesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceDriverPropertiesKHR); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceExternalBufferInfo); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceExternalFenceInfo); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceExternalImageFormatInfo); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceExternalSemaphoreInfo); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceFeatures2); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceGroupProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceIDProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceImageFormatInfo2); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMaintenance3Properties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMemoryProperties2); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMultiviewFeatures); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceMultiviewProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePCIBusInfoPropertiesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePointClippingProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceProperties2); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceProtectedMemoryFeatures); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceProtectedMemoryProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDevicePushDescriptorPropertiesKHR); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceSamplerYcbcrConversionFeatures); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceShaderAtomicInt64FeaturesKHR); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceShaderCorePropertiesAMD); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceShaderDrawParameterFeatures); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceSparseImageFormatInfo2); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceSubgroupProperties); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceSurfaceInfo2KHR); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceTransformFeedbackFeaturesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceTransformFeedbackPropertiesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVariablePointerFeatures); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); +DECLARE_DESERIALISE_TYPE(VkPhysicalDeviceVulkanMemoryModelFeaturesKHR); +DECLARE_DESERIALISE_TYPE(VkPipelineCacheCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineColorBlendStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineDepthStencilStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineDynamicStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineInputAssemblyStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineLayoutCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineMultisampleStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationConservativeStateCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationStateCreateInfo); DECLARE_DESERIALISE_TYPE(VkPipelineRasterizationStateStreamCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkPipelineShaderStageCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineTessellationDomainOriginStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineTessellationStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineVertexInputDivisorStateCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkPipelineVertexInputStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPipelineViewportStateCreateInfo); +DECLARE_DESERIALISE_TYPE(VkPresentInfoKHR); +DECLARE_DESERIALISE_TYPE(VkPresentRegionsKHR); +DECLARE_DESERIALISE_TYPE(VkProtectedSubmitInfo); +DECLARE_DESERIALISE_TYPE(VkQueryPoolCreateInfo); +DECLARE_DESERIALISE_TYPE(VkQueueFamilyProperties2); +DECLARE_DESERIALISE_TYPE(VkRenderPassBeginInfo); +DECLARE_DESERIALISE_TYPE(VkRenderPassCreateInfo); +DECLARE_DESERIALISE_TYPE(VkRenderPassCreateInfo2KHR); +DECLARE_DESERIALISE_TYPE(VkRenderPassInputAttachmentAspectCreateInfo); +DECLARE_DESERIALISE_TYPE(VkRenderPassMultiviewCreateInfo); +DECLARE_DESERIALISE_TYPE(VkSamplerCreateInfo); +DECLARE_DESERIALISE_TYPE(VkSamplerReductionModeCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkSamplerYcbcrConversionCreateInfo); +DECLARE_DESERIALISE_TYPE(VkSamplerYcbcrConversionImageFormatProperties); +DECLARE_DESERIALISE_TYPE(VkSamplerYcbcrConversionInfo); +DECLARE_DESERIALISE_TYPE(VkSemaphoreCreateInfo); +DECLARE_DESERIALISE_TYPE(VkSemaphoreGetFdInfoKHR); +DECLARE_DESERIALISE_TYPE(VkShaderModuleCreateInfo); +DECLARE_DESERIALISE_TYPE(VkShaderModuleValidationCacheCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkSharedPresentSurfaceCapabilitiesKHR); +DECLARE_DESERIALISE_TYPE(VkSparseImageFormatProperties2); +DECLARE_DESERIALISE_TYPE(VkSparseImageMemoryRequirements2); +DECLARE_DESERIALISE_TYPE(VkSubmitInfo); +DECLARE_DESERIALISE_TYPE(VkSubpassBeginInfoKHR); +DECLARE_DESERIALISE_TYPE(VkSubpassDependency2KHR); +DECLARE_DESERIALISE_TYPE(VkSubpassDescription2KHR); +DECLARE_DESERIALISE_TYPE(VkSubpassEndInfoKHR); +DECLARE_DESERIALISE_TYPE(VkSurfaceCapabilities2EXT); +DECLARE_DESERIALISE_TYPE(VkSurfaceCapabilities2KHR); +DECLARE_DESERIALISE_TYPE(VkSurfaceFormat2KHR); +DECLARE_DESERIALISE_TYPE(VkSwapchainCounterCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkSwapchainCreateInfoKHR); +DECLARE_DESERIALISE_TYPE(VkTextureLODGatherFormatPropertiesAMD); +DECLARE_DESERIALISE_TYPE(VkValidationCacheCreateInfoEXT); +DECLARE_DESERIALISE_TYPE(VkValidationFlagsEXT); +DECLARE_DESERIALISE_TYPE(VkWriteDescriptorSet); -#if defined(VK_KHR_external_memory_win32) || defined(VK_NV_external_memory_win32) -DECLARE_REFLECTION_STRUCT(VkImportMemoryWin32HandleInfoNV); -DECLARE_REFLECTION_STRUCT(VkExportMemoryWin32HandleInfoNV); -DECLARE_REFLECTION_STRUCT(VkImportMemoryWin32HandleInfoKHR); +// plain structs with no next chain +DECLARE_REFLECTION_STRUCT(VkAllocationCallbacks); +DECLARE_REFLECTION_STRUCT(VkAttachmentDescription); +DECLARE_REFLECTION_STRUCT(VkAttachmentReference); +DECLARE_REFLECTION_STRUCT(VkBufferCopy); +DECLARE_REFLECTION_STRUCT(VkBufferImageCopy); +DECLARE_REFLECTION_STRUCT(VkClearAttachment); +DECLARE_REFLECTION_STRUCT(VkClearColorValue); +DECLARE_REFLECTION_STRUCT(VkClearDepthStencilValue); +DECLARE_REFLECTION_STRUCT(VkClearRect); +DECLARE_REFLECTION_STRUCT(VkClearValue); +DECLARE_REFLECTION_STRUCT(VkComponentMapping); +DECLARE_REFLECTION_STRUCT(VkConformanceVersionKHR); +DECLARE_REFLECTION_STRUCT(VkDescriptorBufferInfo); +DECLARE_REFLECTION_STRUCT(VkDescriptorImageInfo); +DECLARE_REFLECTION_STRUCT(VkDescriptorPoolSize); +DECLARE_REFLECTION_STRUCT(VkDescriptorSetLayoutBinding); +DECLARE_REFLECTION_STRUCT(VkDescriptorUpdateTemplateEntry); +DECLARE_REFLECTION_STRUCT(VkDispatchIndirectCommand); +DECLARE_REFLECTION_STRUCT(VkDisplayModeParametersKHR); +DECLARE_REFLECTION_STRUCT(VkDisplayModePropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPlaneCapabilitiesKHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPlanePropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkDisplayPropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkDrawIndexedIndirectCommand); +DECLARE_REFLECTION_STRUCT(VkDrawIndirectCommand); +DECLARE_REFLECTION_STRUCT(VkExtent2D); +DECLARE_REFLECTION_STRUCT(VkExtent3D); +DECLARE_REFLECTION_STRUCT(VkExternalMemoryProperties); +DECLARE_REFLECTION_STRUCT(VkFormatProperties); +DECLARE_REFLECTION_STRUCT(VkImageBlit); +DECLARE_REFLECTION_STRUCT(VkImageCopy); +DECLARE_REFLECTION_STRUCT(VkImageFormatProperties); +DECLARE_REFLECTION_STRUCT(VkImageResolve); +DECLARE_REFLECTION_STRUCT(VkImageSubresource); +DECLARE_REFLECTION_STRUCT(VkImageSubresourceLayers); +DECLARE_REFLECTION_STRUCT(VkImageSubresourceRange); +DECLARE_REFLECTION_STRUCT(VkInputAttachmentAspectReference); +DECLARE_REFLECTION_STRUCT(VkMemoryHeap); +DECLARE_REFLECTION_STRUCT(VkMemoryRequirements); +DECLARE_REFLECTION_STRUCT(VkMemoryType); +DECLARE_REFLECTION_STRUCT(VkOffset2D); +DECLARE_REFLECTION_STRUCT(VkOffset3D); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceFeatures); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceLimits); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceMemoryProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceProperties); +DECLARE_REFLECTION_STRUCT(VkPhysicalDeviceSparseProperties); +DECLARE_REFLECTION_STRUCT(VkPipelineColorBlendAttachmentState); +DECLARE_REFLECTION_STRUCT(VkPresentRegionKHR); +DECLARE_REFLECTION_STRUCT(VkPushConstantRange); +DECLARE_REFLECTION_STRUCT(VkQueueFamilyProperties); +DECLARE_REFLECTION_STRUCT(VkRect2D); +DECLARE_REFLECTION_STRUCT(VkRectLayerKHR); +DECLARE_REFLECTION_STRUCT(VkSparseBufferMemoryBindInfo); +DECLARE_REFLECTION_STRUCT(VkSparseImageFormatProperties); +DECLARE_REFLECTION_STRUCT(VkSparseImageMemoryBind); +DECLARE_REFLECTION_STRUCT(VkSparseImageMemoryBindInfo); +DECLARE_REFLECTION_STRUCT(VkSparseImageMemoryRequirements); +DECLARE_REFLECTION_STRUCT(VkSparseImageOpaqueMemoryBindInfo); +DECLARE_REFLECTION_STRUCT(VkSparseMemoryBind); +DECLARE_REFLECTION_STRUCT(VkSpecializationInfo); +DECLARE_REFLECTION_STRUCT(VkSpecializationMapEntry); +DECLARE_REFLECTION_STRUCT(VkStencilOpState); +DECLARE_REFLECTION_STRUCT(VkSubpassDependency); +DECLARE_REFLECTION_STRUCT(VkSubpassDescription); +DECLARE_REFLECTION_STRUCT(VkSurfaceCapabilitiesKHR); +DECLARE_REFLECTION_STRUCT(VkSurfaceFormatKHR); +DECLARE_REFLECTION_STRUCT(VkVertexInputAttributeDescription); +DECLARE_REFLECTION_STRUCT(VkVertexInputBindingDescription); +DECLARE_REFLECTION_STRUCT(VkVertexInputBindingDivisorDescriptionEXT); +DECLARE_REFLECTION_STRUCT(VkViewport); -DECLARE_DESERIALISE_TYPE(VkImportMemoryWin32HandleInfoNV); -DECLARE_DESERIALISE_TYPE(VkExportMemoryWin32HandleInfoNV); -DECLARE_DESERIALISE_TYPE(VkImportMemoryWin32HandleInfoKHR); -#endif +DECLARE_DESERIALISE_TYPE(VkDescriptorSetLayoutBinding); +DECLARE_DESERIALISE_TYPE(VkPresentRegionKHR); +DECLARE_DESERIALISE_TYPE(VkSparseBufferMemoryBindInfo); +DECLARE_DESERIALISE_TYPE(VkSparseImageMemoryBindInfo); +DECLARE_DESERIALISE_TYPE(VkSparseImageOpaqueMemoryBindInfo); +DECLARE_DESERIALISE_TYPE(VkSpecializationInfo); +DECLARE_DESERIALISE_TYPE(VkSubpassDescription); -#ifdef VK_KHR_external_fence_win32 +// win32 only structs +#if ENABLED(RDOC_WIN32) +DECLARE_REFLECTION_STRUCT(VkD3D12FenceSubmitInfoKHR); DECLARE_REFLECTION_STRUCT(VkExportFenceWin32HandleInfoKHR); - -DECLARE_DESERIALISE_TYPE(VkExportFenceWin32HandleInfoKHR); -#endif - -#ifdef VK_KHR_external_semaphore_win32 +DECLARE_REFLECTION_STRUCT(VkExportMemoryWin32HandleInfoKHR); +DECLARE_REFLECTION_STRUCT(VkExportMemoryWin32HandleInfoNV); DECLARE_REFLECTION_STRUCT(VkExportSemaphoreWin32HandleInfoKHR); - -DECLARE_DESERIALISE_TYPE(VkExportSemaphoreWin32HandleInfoKHR); -#endif - -#if defined(VK_KHR_win32_keyed_mutex) || defined(VK_NV_win32_keyed_mutex) -DECLARE_REFLECTION_STRUCT(VkWin32KeyedMutexAcquireReleaseInfoNV); +DECLARE_REFLECTION_STRUCT(VkFenceGetWin32HandleInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImportFenceWin32HandleInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImportMemoryWin32HandleInfoKHR); +DECLARE_REFLECTION_STRUCT(VkImportMemoryWin32HandleInfoNV); +DECLARE_REFLECTION_STRUCT(VkImportSemaphoreWin32HandleInfoKHR); +DECLARE_REFLECTION_STRUCT(VkMemoryGetWin32HandleInfoKHR); +DECLARE_REFLECTION_STRUCT(VkMemoryWin32HandlePropertiesKHR); +DECLARE_REFLECTION_STRUCT(VkSemaphoreGetWin32HandleInfoKHR); DECLARE_REFLECTION_STRUCT(VkWin32KeyedMutexAcquireReleaseInfoKHR); +DECLARE_REFLECTION_STRUCT(VkWin32KeyedMutexAcquireReleaseInfoNV); -DECLARE_DESERIALISE_TYPE(VkWin32KeyedMutexAcquireReleaseInfoNV); +DECLARE_DESERIALISE_TYPE(VkD3D12FenceSubmitInfoKHR); +DECLARE_DESERIALISE_TYPE(VkExportFenceWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkExportMemoryWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkExportMemoryWin32HandleInfoNV); +DECLARE_DESERIALISE_TYPE(VkExportSemaphoreWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkFenceGetWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImportFenceWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImportMemoryWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkImportMemoryWin32HandleInfoNV); +DECLARE_DESERIALISE_TYPE(VkImportSemaphoreWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkMemoryGetWin32HandleInfoKHR); +DECLARE_DESERIALISE_TYPE(VkMemoryWin32HandlePropertiesKHR); +DECLARE_DESERIALISE_TYPE(VkSemaphoreGetWin32HandleInfoKHR); DECLARE_DESERIALISE_TYPE(VkWin32KeyedMutexAcquireReleaseInfoKHR); +DECLARE_DESERIALISE_TYPE(VkWin32KeyedMutexAcquireReleaseInfoNV); #endif +// enums + DECLARE_REFLECTION_ENUM(VkFlagWithNoBits); -DECLARE_REFLECTION_ENUM(VkQueueFlagBits); -DECLARE_REFLECTION_ENUM(VkPipelineCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkPipelineStageFlagBits); -DECLARE_REFLECTION_ENUM(VkBufferUsageFlagBits); -DECLARE_REFLECTION_ENUM(VkImageUsageFlagBits); -DECLARE_REFLECTION_ENUM(VkBufferCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkImageCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkSparseMemoryBindFlagBits); -DECLARE_REFLECTION_ENUM(VkCommandPoolCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkCommandPoolResetFlagBits); -DECLARE_REFLECTION_ENUM(VkCommandBufferUsageFlagBits); -DECLARE_REFLECTION_ENUM(VkDescriptorPoolCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkFenceCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkQueryPipelineStatisticFlagBits); -DECLARE_REFLECTION_ENUM(VkQueryControlFlagBits); -DECLARE_REFLECTION_ENUM(VkQueryResultFlagBits); -DECLARE_REFLECTION_ENUM(VkAttachmentDescriptionFlagBits); -DECLARE_REFLECTION_ENUM(VkSampleCountFlagBits); -DECLARE_REFLECTION_ENUM(VkImageAspectFlagBits); -DECLARE_REFLECTION_ENUM(VkDependencyFlagBits); -DECLARE_REFLECTION_ENUM(VkShaderStageFlagBits); -DECLARE_REFLECTION_ENUM(VkMemoryHeapFlagBits); -DECLARE_REFLECTION_ENUM(VkMemoryPropertyFlagBits); DECLARE_REFLECTION_ENUM(VkAccessFlagBits); -DECLARE_REFLECTION_ENUM(VkStencilFaceFlagBits); -DECLARE_REFLECTION_ENUM(VkCullModeFlagBits); -DECLARE_REFLECTION_ENUM(VkPipelineBindPoint); -DECLARE_REFLECTION_ENUM(VkIndexType); -DECLARE_REFLECTION_ENUM(VkImageType); -DECLARE_REFLECTION_ENUM(VkImageTiling); -DECLARE_REFLECTION_ENUM(VkImageViewType); -DECLARE_REFLECTION_ENUM(VkVertexInputRate); -DECLARE_REFLECTION_ENUM(VkPolygonMode); -DECLARE_REFLECTION_ENUM(VkFrontFace); -DECLARE_REFLECTION_ENUM(VkBlendFactor); -DECLARE_REFLECTION_ENUM(VkBlendOp); -DECLARE_REFLECTION_ENUM(VkDynamicState); +DECLARE_REFLECTION_ENUM(VkAttachmentDescriptionFlagBits); DECLARE_REFLECTION_ENUM(VkAttachmentLoadOp); DECLARE_REFLECTION_ENUM(VkAttachmentStoreOp); -DECLARE_REFLECTION_ENUM(VkStencilOp); -DECLARE_REFLECTION_ENUM(VkLogicOp); -DECLARE_REFLECTION_ENUM(VkCompareOp); -DECLARE_REFLECTION_ENUM(VkFilter); -DECLARE_REFLECTION_ENUM(VkSamplerMipmapMode); -DECLARE_REFLECTION_ENUM(VkSamplerAddressMode); +DECLARE_REFLECTION_ENUM(VkBlendFactor); +DECLARE_REFLECTION_ENUM(VkBlendOp); DECLARE_REFLECTION_ENUM(VkBorderColor); -DECLARE_REFLECTION_ENUM(VkPrimitiveTopology); -DECLARE_REFLECTION_ENUM(VkDescriptorType); -DECLARE_REFLECTION_ENUM(VkQueryType); -DECLARE_REFLECTION_ENUM(VkPhysicalDeviceType); -DECLARE_REFLECTION_ENUM(VkSharingMode); -DECLARE_REFLECTION_ENUM(VkCommandBufferLevel); -DECLARE_REFLECTION_ENUM(VkSubpassContents); -DECLARE_REFLECTION_ENUM(VkImageLayout); -DECLARE_REFLECTION_ENUM(VkStructureType); -DECLARE_REFLECTION_ENUM(VkComponentSwizzle); -DECLARE_REFLECTION_ENUM(VkFormat); -DECLARE_REFLECTION_ENUM(VkResult); -DECLARE_REFLECTION_ENUM(VkSurfaceTransformFlagBitsKHR); -DECLARE_REFLECTION_ENUM(VkCompositeAlphaFlagBitsKHR); +DECLARE_REFLECTION_ENUM(VkBufferCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkBufferUsageFlagBits); +DECLARE_REFLECTION_ENUM(VkChromaLocation); DECLARE_REFLECTION_ENUM(VkColorSpaceKHR); -DECLARE_REFLECTION_ENUM(VkPresentModeKHR); -DECLARE_REFLECTION_ENUM(VkDescriptorUpdateTemplateType); +DECLARE_REFLECTION_ENUM(VkCommandBufferLevel); +DECLARE_REFLECTION_ENUM(VkCommandBufferUsageFlagBits); +DECLARE_REFLECTION_ENUM(VkCommandPoolCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkCommandPoolResetFlagBits); +DECLARE_REFLECTION_ENUM(VkCompareOp); +DECLARE_REFLECTION_ENUM(VkComponentSwizzle); +DECLARE_REFLECTION_ENUM(VkCompositeAlphaFlagBitsKHR); DECLARE_REFLECTION_ENUM(VkConservativeRasterizationModeEXT); -DECLARE_REFLECTION_ENUM(VkTessellationDomainOrigin); +DECLARE_REFLECTION_ENUM(VkCullModeFlagBits); +DECLARE_REFLECTION_ENUM(VkDebugReportFlagBitsEXT); +DECLARE_REFLECTION_ENUM(VkDebugUtilsMessageSeverityFlagBitsEXT); +DECLARE_REFLECTION_ENUM(VkDebugUtilsMessageTypeFlagBitsEXT); +DECLARE_REFLECTION_ENUM(VkDependencyFlagBits); +DECLARE_REFLECTION_ENUM(VkDescriptorPoolCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkDescriptorSetLayoutCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkDescriptorType); +DECLARE_REFLECTION_ENUM(VkDescriptorUpdateTemplateType); +DECLARE_REFLECTION_ENUM(VkDeviceGroupPresentModeFlagBitsKHR); +DECLARE_REFLECTION_ENUM(VkDeviceQueueCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkDynamicState); +DECLARE_REFLECTION_ENUM(VkExternalFenceHandleTypeFlagBits); +DECLARE_REFLECTION_ENUM(VkExternalMemoryHandleTypeFlagBits); +DECLARE_REFLECTION_ENUM(VkExternalMemoryHandleTypeFlagBitsNV); +DECLARE_REFLECTION_ENUM(VkExternalSemaphoreHandleTypeFlagBits); +DECLARE_REFLECTION_ENUM(VkFenceCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkFilter); +DECLARE_REFLECTION_ENUM(VkFormat); +DECLARE_REFLECTION_ENUM(VkFrontFace); +DECLARE_REFLECTION_ENUM(VkImageAspectFlagBits); +DECLARE_REFLECTION_ENUM(VkImageCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkImageLayout); +DECLARE_REFLECTION_ENUM(VkImageTiling); +DECLARE_REFLECTION_ENUM(VkImageType); +DECLARE_REFLECTION_ENUM(VkImageUsageFlagBits); +DECLARE_REFLECTION_ENUM(VkImageViewType); +DECLARE_REFLECTION_ENUM(VkIndexType); +DECLARE_REFLECTION_ENUM(VkLogicOp); +DECLARE_REFLECTION_ENUM(VkMemoryAllocateFlagBits); +DECLARE_REFLECTION_ENUM(VkMemoryHeapFlagBits); +DECLARE_REFLECTION_ENUM(VkMemoryPropertyFlagBits); +DECLARE_REFLECTION_ENUM(VkPhysicalDeviceType); +DECLARE_REFLECTION_ENUM(VkPipelineBindPoint); +DECLARE_REFLECTION_ENUM(VkPipelineCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkPipelineStageFlagBits); +DECLARE_REFLECTION_ENUM(VkPolygonMode); +DECLARE_REFLECTION_ENUM(VkPresentModeKHR); +DECLARE_REFLECTION_ENUM(VkPrimitiveTopology); +DECLARE_REFLECTION_ENUM(VkQueryControlFlagBits); +DECLARE_REFLECTION_ENUM(VkQueryPipelineStatisticFlagBits); +DECLARE_REFLECTION_ENUM(VkQueryResultFlagBits); +DECLARE_REFLECTION_ENUM(VkQueryType); +DECLARE_REFLECTION_ENUM(VkQueueFlagBits); +DECLARE_REFLECTION_ENUM(VkQueueGlobalPriorityEXT); +DECLARE_REFLECTION_ENUM(VkResult); +DECLARE_REFLECTION_ENUM(VkSampleCountFlagBits); +DECLARE_REFLECTION_ENUM(VkSamplerAddressMode); +DECLARE_REFLECTION_ENUM(VkSamplerMipmapMode); DECLARE_REFLECTION_ENUM(VkSamplerReductionModeEXT); DECLARE_REFLECTION_ENUM(VkSamplerYcbcrModelConversion); DECLARE_REFLECTION_ENUM(VkSamplerYcbcrRange); -DECLARE_REFLECTION_ENUM(VkChromaLocation); -DECLARE_REFLECTION_ENUM(VkDeviceQueueCreateFlagBits); +DECLARE_REFLECTION_ENUM(VkShaderStageFlagBits); +DECLARE_REFLECTION_ENUM(VkSharingMode); +DECLARE_REFLECTION_ENUM(VkSparseMemoryBindFlagBits); +DECLARE_REFLECTION_ENUM(VkStencilFaceFlagBits); +DECLARE_REFLECTION_ENUM(VkStencilOp); +DECLARE_REFLECTION_ENUM(VkStructureType); +DECLARE_REFLECTION_ENUM(VkSubpassContents); DECLARE_REFLECTION_ENUM(VkSubpassDescriptionFlagBits); -DECLARE_REFLECTION_ENUM(VkDescriptorSetLayoutCreateFlagBits); -DECLARE_REFLECTION_ENUM(VkSwapchainCreateFlagBitsKHR); -DECLARE_REFLECTION_ENUM(VkExternalMemoryHandleTypeFlagBitsNV); -DECLARE_REFLECTION_ENUM(VkExternalMemoryHandleTypeFlagBits); -DECLARE_REFLECTION_ENUM(VkExternalSemaphoreHandleTypeFlagBits); -DECLARE_REFLECTION_ENUM(VkExternalFenceHandleTypeFlagBits); DECLARE_REFLECTION_ENUM(VkSurfaceCounterFlagBitsEXT); -DECLARE_REFLECTION_ENUM(VkQueueGlobalPriorityEXT); -DECLARE_REFLECTION_ENUM(VkDeviceGroupPresentModeFlagBitsKHR); -DECLARE_REFLECTION_ENUM(VkMemoryAllocateFlagBits); \ No newline at end of file +DECLARE_REFLECTION_ENUM(VkSurfaceTransformFlagBitsKHR); +DECLARE_REFLECTION_ENUM(VkSwapchainCreateFlagBitsKHR); +DECLARE_REFLECTION_ENUM(VkTessellationDomainOrigin); +DECLARE_REFLECTION_ENUM(VkVertexInputRate); + +DECLARE_REFLECTION_ENUM(VkDeviceEventTypeEXT); +DECLARE_REFLECTION_ENUM(VkValidationCheckEXT); +DECLARE_REFLECTION_ENUM(VkDriverIdKHR); +DECLARE_REFLECTION_ENUM(VkSemaphoreImportFlagBits); +DECLARE_REFLECTION_ENUM(VkFenceImportFlagBits); +DECLARE_REFLECTION_ENUM(VkExternalSemaphoreFeatureFlagBits); +DECLARE_REFLECTION_ENUM(VkExternalFenceFeatureFlagBits); +DECLARE_REFLECTION_ENUM(VkDisplayPowerStateEXT); +DECLARE_REFLECTION_ENUM(VkDisplayEventTypeEXT); +DECLARE_REFLECTION_ENUM(VkSparseImageFormatFlagBits); +DECLARE_REFLECTION_ENUM(VkFormatFeatureFlagBits); +DECLARE_REFLECTION_ENUM(VkExternalMemoryFeatureFlagBits); +DECLARE_REFLECTION_ENUM(VkDisplayPlaneAlphaFlagBitsKHR); +DECLARE_REFLECTION_ENUM(VkPointClippingBehavior); +DECLARE_REFLECTION_ENUM(VkSubgroupFeatureFlagBits); \ No newline at end of file diff --git a/renderdoc/driver/vulkan/vk_next_chains.cpp b/renderdoc/driver/vulkan/vk_next_chains.cpp new file mode 100644 index 000000000..107eca217 --- /dev/null +++ b/renderdoc/driver/vulkan/vk_next_chains.cpp @@ -0,0 +1,1254 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2015-2018 Baldur Karlsson + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + ******************************************************************************/ + +#include "vk_common.h" +#include "vk_resources.h" + +template +static void UnwrapInPlace(VkStruct &s) +{ + s = Unwrap(s); +} + +// utility function for when we're modifying one struct in a pNext chain, this +// lets us just copy across a struct unmodified into some temporary memory and +// append it onto a pNext chain we're building +static void CopyNextChainedStruct(const size_t structSize, byte *&tempMem, + const VkBaseInStructure *nextInput, + VkBaseInStructure *&nextChainTail) +{ + VkBaseInStructure *outstruct = (VkBaseInStructure *)tempMem; + + tempMem += structSize; + + // copy the struct, nothing to unwrap + memcpy(outstruct, nextInput, structSize); + + // default to NULL. It will be overwritten next time if there is a next object + outstruct->pNext = NULL; + + // append this onto the chain + nextChainTail->pNext = outstruct; + nextChainTail = outstruct; +} + +// this is similar to the above function, but for use after we've modified a struct locally +// e.g. to unwrap some members or patch flags, etc. +template +static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct, + VkBaseInStructure *&nextChainTail) +{ + tempMem = (byte *)(outputStruct + 1); + + // default to NULL. It will be overwritten in the next step if there is a next object + outputStruct->pNext = NULL; + + // append this onto the chain + nextChainTail->pNext = (const VkBaseInStructure *)outputStruct; + nextChainTail = (VkBaseInStructure *)outputStruct; +} + +// define structs that just need to be copied with no unwrapping at all, or only unwrapping some +// members - easily shared between GetNextPatchSize and UnwrapNextChain +#define PROCESS_SIMPLE_STRUCTS() \ + COPY_STRUCT(VK_STRUCTURE_TYPE_APPLICATION_INFO, VkApplicationInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR, VkAttachmentDescription2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR, VkAttachmentReference2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, \ + VkBindBufferMemoryDeviceGroupInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, \ + VkBindImageMemoryDeviceGroupInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, VkBindImagePlaneMemoryInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, VkBufferCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, VkCommandBufferBeginInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, VkCommandPoolCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT, VkDebugMarkerMarkerInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, \ + VkDebugReportCallbackCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, VkDebugUtilsLabelEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, \ + VkDebugUtilsMessengerCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV, \ + VkDedicatedAllocationBufferCreateInfoNV); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV, \ + VkDedicatedAllocationImageCreateInfoNV); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, VkDescriptorPoolCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, VkDescriptorSetLayoutSupport); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, VkDeviceCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, VkDeviceGroupBindSparseInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, \ + VkDeviceGroupCommandBufferBeginInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, \ + VkDeviceGroupPresentCapabilitiesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR, VkDeviceGroupPresentInfoKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, \ + VkDeviceGroupRenderPassBeginInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, VkDeviceGroupSubmitInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR, \ + VkDeviceGroupSwapchainCreateInfoKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, VkDeviceQueueCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT, \ + VkDeviceQueueGlobalPriorityCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2, VkDeviceQueueInfo2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR, VkDisplayModeProperties2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR, VkDisplayPlaneCapabilities2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR, VkDisplayPlaneInfo2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR, VkDisplayPlaneProperties2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR, VkDisplayPresentInfoKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR, VkDisplayProperties2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, VkEventCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, VkExternalBufferProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, VkExternalImageFormatProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, VkFenceCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, VkFormatProperties2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, VkImageCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, VkImageFormatListCreateInfoKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, VkImageFormatProperties2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, \ + VkImagePlaneMemoryRequirementsInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT, VkImageViewASTCDecodeModeEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, VkImageViewUsageCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, VkInstanceCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, VkMemoryAllocateFlagsInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, VkMemoryAllocateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER, VkMemoryBarrier); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, VkMemoryDedicatedRequirements); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, VkMemoryRequirements2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, \ + VkPhysicalDevice16BitStorageFeatures); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR, \ + VkPhysicalDevice8BitStorageFeaturesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT, \ + VkPhysicalDeviceASTCDecodeFeaturesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, \ + VkPhysicalDeviceConservativeRasterizationPropertiesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, \ + VkPhysicalDeviceDriverPropertiesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, \ + VkPhysicalDeviceExternalBufferInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, \ + VkPhysicalDeviceExternalImageFormatInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, \ + VkPhysicalDeviceExternalSemaphoreInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, VkPhysicalDeviceFeatures2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, VkPhysicalDeviceIDProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, \ + VkPhysicalDeviceImageFormatInfo2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, \ + VkPhysicalDeviceMaintenance3Properties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, \ + VkPhysicalDeviceMemoryProperties2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, \ + VkPhysicalDeviceMultiviewFeatures); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, \ + VkPhysicalDeviceMultiviewProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, \ + VkPhysicalDevicePCIBusInfoPropertiesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, \ + VkPhysicalDevicePointClippingProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, VkPhysicalDeviceProperties2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES, \ + VkPhysicalDeviceProtectedMemoryFeatures); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES, \ + VkPhysicalDeviceProtectedMemoryProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR, \ + VkPhysicalDevicePushDescriptorPropertiesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT, \ + VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, \ + VkPhysicalDeviceSamplerYcbcrConversionFeatures); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR, \ + VkPhysicalDeviceShaderAtomicInt64FeaturesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD, \ + VkPhysicalDeviceShaderCorePropertiesAMD); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES, \ + VkPhysicalDeviceShaderDrawParameterFeatures); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, \ + VkPhysicalDeviceSparseImageFormatInfo2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, \ + VkPhysicalDeviceSubgroupProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, \ + VkPhysicalDeviceTransformFeedbackFeaturesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, \ + VkPhysicalDeviceTransformFeedbackPropertiesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES, \ + VkPhysicalDeviceVariablePointerFeatures); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, \ + VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, \ + VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR, \ + VkPhysicalDeviceVulkanMemoryModelFeaturesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, VkPipelineCacheCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, \ + VkPipelineColorBlendStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, \ + VkPipelineDepthStencilStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, \ + VkPipelineDynamicStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, \ + VkPipelineInputAssemblyStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, \ + VkPipelineMultisampleStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, \ + VkPipelineRasterizationConservativeStateCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, \ + VkPipelineRasterizationStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, \ + VkPipelineRasterizationStateStreamCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, VkPipelineShaderStageCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, \ + VkPipelineTessellationDomainOriginStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, \ + VkPipelineTessellationStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT, \ + VkPipelineVertexInputDivisorStateCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, \ + VkPipelineVertexInputStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, \ + VkPipelineViewportStateCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR, VkPresentRegionsKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, VkQueryPoolCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, VkQueueFamilyProperties2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, VkRenderPassCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR, VkRenderPassCreateInfo2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, \ + VkRenderPassInputAttachmentAspectCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, VkRenderPassMultiviewCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, VkSamplerCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT, \ + VkSamplerReductionModeCreateInfoEXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, \ + VkSamplerYcbcrConversionCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, \ + VkSamplerYcbcrConversionImageFormatProperties); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, VkSemaphoreCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, VkShaderModuleCreateInfo); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, \ + VkSharedPresentSurfaceCapabilitiesKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, VkSparseImageFormatProperties2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, \ + VkSparseImageMemoryRequirements2); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR, VkSubpassBeginInfoKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR, VkSubpassDependency2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR, VkSubpassDescription2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR, VkSubpassEndInfoKHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, VkSurfaceCapabilities2EXT); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR, VkSurfaceCapabilities2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR, VkSurfaceFormat2KHR); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD, \ + VkTextureLODGatherFormatPropertiesAMD); \ + COPY_STRUCT(VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT, VkValidationCacheCreateInfoEXT); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, \ + VkLayerInstanceCreateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, VkLayerDeviceCreateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT, VkDeviceEventInfoEXT); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT, VkDisplayEventInfoEXT); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT, VkDisplayPowerInfoEXT); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, VkExportFenceCreateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, \ + VkExportMemoryAllocateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, \ + VkExportMemoryAllocateInfoNV); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, \ + VkExportSemaphoreCreateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, VkExternalFenceProperties); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, \ + VkExternalMemoryBufferCreateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, \ + VkExternalMemoryImageCreateInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV, \ + VkExternalMemoryImageCreateInfoNV); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, \ + VkExternalSemaphoreProperties); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, VkImportMemoryFdInfoKHR); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR, VkMemoryFdPropertiesKHR); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, \ + VkPhysicalDeviceExternalFenceInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO, VkProtectedSubmitInfo); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT, \ + VkShaderModuleValidationCacheCreateInfoEXT); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT, \ + VkSwapchainCounterCreateInfoEXT); \ + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT, VkValidationFlagsEXT); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, VkBindBufferMemoryInfo, \ + UnwrapInPlace(out->buffer), UnwrapInPlace(out->memory)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, VkBindImageMemoryInfo, \ + UnwrapInPlace(out->image), UnwrapInPlace(out->memory)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, VkBufferMemoryBarrier, \ + UnwrapInPlace(out->buffer)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, \ + VkBufferMemoryRequirementsInfo2, UnwrapInPlace(out->buffer)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, VkBufferViewCreateInfo, \ + UnwrapInPlace(out->buffer)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, VkCommandBufferAllocateInfo, \ + UnwrapInPlace(out->commandPool)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, VkCommandBufferInheritanceInfo, \ + UnwrapInPlace(out->renderPass), UnwrapInPlace(out->framebuffer)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, VkComputePipelineCreateInfo, \ + UnwrapInPlace(out->stage.module), UnwrapInPlace(out->layout), \ + UnwrapInPlace(out->basePipelineHandle)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, VkCopyDescriptorSet, \ + UnwrapInPlace(out->srcSet), UnwrapInPlace(out->dstSet)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, \ + VkDedicatedAllocationMemoryAllocateInfoNV, UnwrapInPlace(out->buffer), \ + UnwrapInPlace(out->image)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, \ + VkDescriptorUpdateTemplateCreateInfo, UnwrapInPlace(out->descriptorSetLayout), \ + UnwrapInPlace(out->pipelineLayout)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, VkImageMemoryBarrier, \ + UnwrapInPlace(out->image)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, \ + VkImageMemoryRequirementsInfo2, UnwrapInPlace(out->image)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, \ + VkImageSparseMemoryRequirementsInfo2, UnwrapInPlace(out->image)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, VkImageViewCreateInfo, \ + UnwrapInPlace(out->image)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, VkMappedMemoryRange, \ + UnwrapInPlace(out->memory)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, VkMemoryDedicatedAllocateInfo, \ + UnwrapInPlace(out->buffer), UnwrapInPlace(out->image)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, VkRenderPassBeginInfo, \ + UnwrapInPlace(out->renderPass), UnwrapInPlace(out->framebuffer)); \ + UNWRAP_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, VkSamplerYcbcrConversionInfo, \ + UnwrapInPlace(out->conversion)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR, \ + VkAcquireNextImageInfoKHR, UnwrapInPlace(out->swapchain), \ + UnwrapInPlace(out->semaphore), UnwrapInPlace(out->fence)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, \ + VkBindImageMemorySwapchainInfoKHR, UnwrapInPlace(out->swapchain)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, VkFenceGetFdInfoKHR, \ + UnwrapInPlace(out->fence)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR, \ + VkImageSwapchainCreateInfoKHR, UnwrapInPlace(out->swapchain)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, VkImportFenceFdInfoKHR, \ + UnwrapInPlace(out->fence)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, \ + VkImportSemaphoreFdInfoKHR, UnwrapInPlace(out->semaphore)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR, VkMemoryGetFdInfoKHR, \ + UnwrapInPlace(out->memory)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, \ + VkPhysicalDeviceSurfaceInfo2KHR, UnwrapInPlace(out->surface)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, VkSemaphoreGetFdInfoKHR, \ + UnwrapInPlace(out->semaphore)); \ + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, VkSwapchainCreateInfoKHR, \ + UnwrapInPlace(out->surface), UnwrapInPlace(out->oldSwapchain)); + +// define cases for structs we don't handle at all - only the body of the case needs to be defined +// per-function. +#define UNHANDLED_STRUCTS() \ + /* Surface creation structs would pull in dependencies on OS-specific includes, */ \ + /* so we treat them as unsupported. */ \ + case VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR: \ + case VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR: \ + case VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR: \ + case VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA: \ + case VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK: \ + case VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK: \ + case VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN: \ + case VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR: \ + case VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR: \ + case VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR: \ + case VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR: \ + /* Output structure containing objects. Must be *wrapped* not unwrapped. */ \ + /* So we treat this as unhandled in generic code and require specific handling. */ \ + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV: \ + case VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV: \ + case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID: \ + case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID: \ + case VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID: \ + case VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV: \ + case VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT: \ + case VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV: \ + case VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX: \ + case VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX: \ + case VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT: \ + case VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT: \ + case VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT: \ + case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX: \ + case VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX: \ + case VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD: \ + case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT: \ + case VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID: \ + case VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV: \ + case VK_STRUCTURE_TYPE_GEOMETRY_NV: \ + case VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV: \ + case VK_STRUCTURE_TYPE_HDR_METADATA_EXT: \ + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: \ + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT: \ + case VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX: \ + case VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID: \ + case VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV: \ + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD: \ + case VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT: \ + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE: \ + case VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV: \ + case VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV: \ + case VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT: \ + case VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT: \ + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV: \ + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT: + +size_t GetNextPatchSize(const void *pNext) +{ + const VkBaseInStructure *next = (const VkBaseInStructure *)pNext; + size_t memSize = 0; + + while(next) + { +#undef COPY_STRUCT_CAPTURE_ONLY +#define COPY_STRUCT_CAPTURE_ONLY(StructType, StructName) \ + case StructType: \ + memSize += sizeof(StructName); \ + break; + +#undef COPY_STRUCT +#define COPY_STRUCT(StructType, StructName) \ + case StructType: \ + memSize += sizeof(StructName); \ + break; + +#undef UNWRAP_STRUCT +#define UNWRAP_STRUCT(StructType, StructName, ...) \ + case StructType: \ + memSize += sizeof(StructName); \ + break; + +#undef UNWRAP_STRUCT_CAPTURE_ONLY +#define UNWRAP_STRUCT_CAPTURE_ONLY(StructType, StructName, ...) \ + case StructType: memSize += sizeof(StructName); break; + + switch(next->sType) + { + PROCESS_SIMPLE_STRUCTS(); + + // complex structs to handle - require multiple allocations + case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: + { + memSize += sizeof(VkBindSparseInfo); + + VkBindSparseInfo *info = (VkBindSparseInfo *)next; + memSize += info->waitSemaphoreCount * sizeof(VkSemaphore); + memSize += info->signalSemaphoreCount * sizeof(VkSemaphore); + memSize += info->bufferBindCount * sizeof(VkSparseBufferMemoryBindInfo); + memSize += info->imageOpaqueBindCount * sizeof(VkSparseImageOpaqueMemoryBindInfo); + memSize += info->imageBindCount * sizeof(VkSparseImageMemoryBindInfo); + for(uint32_t i = 0; i < info->bufferBindCount; i++) + memSize += info->pBufferBinds[i].bindCount * sizeof(VkSparseMemoryBind); + for(uint32_t i = 0; i < info->imageOpaqueBindCount; i++) + memSize += info->pImageOpaqueBinds[i].bindCount * sizeof(VkSparseMemoryBind); + for(uint32_t i = 0; i < info->imageBindCount; i++) + memSize += info->pImageBinds[i].bindCount * sizeof(VkSparseImageMemoryBind); + break; + } + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: + { + memSize += sizeof(VkDescriptorSetAllocateInfo); + + VkDescriptorSetAllocateInfo *info = (VkDescriptorSetAllocateInfo *)next; + memSize += info->descriptorSetCount * sizeof(VkDescriptorSetLayout); + break; + } + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: + { + memSize += sizeof(VkDescriptorSetLayoutCreateInfo); + + VkDescriptorSetLayoutCreateInfo *info = (VkDescriptorSetLayoutCreateInfo *)next; + memSize += info->bindingCount * sizeof(VkDescriptorSetLayoutBinding); + + for(uint32_t i = 0; i < info->bindingCount; i++) + if(info->pBindings[i].pImmutableSamplers) + memSize += info->pBindings[i].descriptorCount * sizeof(VkSampler); + break; + } + case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: + { + memSize += sizeof(VkDeviceGroupDeviceCreateInfo); + + VkDeviceGroupDeviceCreateInfo *info = (VkDeviceGroupDeviceCreateInfo *)next; + memSize += info->physicalDeviceCount * sizeof(VkPhysicalDevice); + break; + } + case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO: + { + memSize += sizeof(VkFramebufferCreateInfo); + + VkFramebufferCreateInfo *info = (VkFramebufferCreateInfo *)next; + memSize += info->attachmentCount * sizeof(VkImageView); + break; + } + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: + { + memSize += sizeof(VkGraphicsPipelineCreateInfo); + + VkGraphicsPipelineCreateInfo *info = (VkGraphicsPipelineCreateInfo *)next; + memSize += info->stageCount * sizeof(VkPipelineShaderStageCreateInfo); + break; + } + case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: + { + memSize += sizeof(VkPipelineLayoutCreateInfo); + + VkPipelineLayoutCreateInfo *info = (VkPipelineLayoutCreateInfo *)next; + memSize += info->setLayoutCount * sizeof(VkDescriptorSetLayout); + break; + } + case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR: + { + memSize += sizeof(VkPresentInfoKHR); + + VkPresentInfoKHR *info = (VkPresentInfoKHR *)next; + memSize += info->waitSemaphoreCount * sizeof(VkSemaphore); + memSize += info->swapchainCount * sizeof(VkSwapchainKHR); + break; + } + case VK_STRUCTURE_TYPE_SUBMIT_INFO: + { + memSize += sizeof(VkSubmitInfo); + + VkSubmitInfo *info = (VkSubmitInfo *)next; + memSize += info->waitSemaphoreCount * sizeof(VkSemaphore); + memSize += info->commandBufferCount * sizeof(VkCommandBuffer); + memSize += info->signalSemaphoreCount * sizeof(VkSemaphore); + break; + } + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: + { + memSize += sizeof(VkWriteDescriptorSet); + + VkWriteDescriptorSet *info = (VkWriteDescriptorSet *)next; + switch(info->descriptorType) + { + case VK_DESCRIPTOR_TYPE_SAMPLER: + case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: + case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: + memSize += info->descriptorCount * sizeof(VkDescriptorImageInfo); + break; + case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + memSize += info->descriptorCount * sizeof(VkBufferView); + break; + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + memSize += info->descriptorCount * sizeof(VkDescriptorBufferInfo); + break; + default: RDCERR("Unhandled descriptor type unwrapping VkWriteDescriptorSet"); break; + } + break; + } + +// NV win32 external memory extensions +#if ENABLED(RDOC_WIN32) + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV, + VkImportMemoryWin32HandleInfoNV); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV, + VkExportMemoryWin32HandleInfoNV); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, + VkImportMemoryWin32HandleInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, + VkExportMemoryWin32HandleInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, + VkMemoryWin32HandlePropertiesKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, + VkExportSemaphoreWin32HandleInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR, + VkD3D12FenceSubmitInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR, + VkExportFenceWin32HandleInfoKHR); + + case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR: + memSize += sizeof(VkMemoryGetWin32HandleInfoKHR); + break; + case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + memSize += sizeof(VkImportSemaphoreWin32HandleInfoKHR); + break; + case VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR: + memSize += sizeof(VkSemaphoreGetWin32HandleInfoKHR); + break; + case VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR: + memSize += sizeof(VkImportFenceWin32HandleInfoKHR); + break; + case VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR: + memSize += sizeof(VkFenceGetWin32HandleInfoKHR); + break; + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: + { + // the KHR and NV structs are identical + memSize += sizeof(VkWin32KeyedMutexAcquireReleaseInfoKHR); + + VkWin32KeyedMutexAcquireReleaseInfoKHR *info = (VkWin32KeyedMutexAcquireReleaseInfoKHR *)next; + memSize += info->acquireCount * sizeof(VkDeviceMemory); + memSize += info->releaseCount * sizeof(VkDeviceMemory); + break; + } +#else + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR: + case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: + case VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: + { + RDCERR("Support for win32 external memory extensions not compiled in"); + break; + } +#endif + + case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT: + { + // could be implemented but would need extra work or doesn't make sense right now + RDCERR("Struct %s not handled in pNext chain", ToStr(next->sType).c_str()); + break; + } + + UNHANDLED_STRUCTS() + { + RDCERR("Unhandled struct %s in pNext chain", ToStr(next->sType).c_str()); + break; + } + + case VK_STRUCTURE_TYPE_RANGE_SIZE: + case VK_STRUCTURE_TYPE_MAX_ENUM: + RDCERR("Invalid value %x in pNext chain", next->sType); + break; + } + + next = next->pNext; + } + + return memSize; +} + +void UnwrapNextChain(CaptureState state, const char *structName, byte *&tempMem, + VkBaseInStructure *infoStruct) +{ + // during capture, this walks the pNext chain and either copies structs that can be passed + // straight through, or copies and modifies any with vulkan objects that need to be unwrapped. + // + // during replay, we do the same thing to prepare for dispatching to the driver, but we also strip + // out any structs we don't want to replay - e.g. external memory. This means the data is + // serialised and available for future use and for user inspection, but isn't replayed when not + // necesary. + + VkBaseInStructure *nextChainTail = infoStruct; + const VkBaseInStructure *nextInput = (const VkBaseInStructure *)infoStruct->pNext; + +#undef COPY_STRUCT_CAPTURE_ONLY +#define COPY_STRUCT_CAPTURE_ONLY(StructType, StructName) \ + case StructType: \ + { \ + if(IsCaptureMode(state)) \ + CopyNextChainedStruct(sizeof(StructName), tempMem, nextInput, nextChainTail); \ + break; \ + } + +#undef COPY_STRUCT +#define COPY_STRUCT(StructType, StructName) \ + case StructType: \ + { \ + CopyNextChainedStruct(sizeof(StructName), tempMem, nextInput, nextChainTail); \ + break; \ + } + +#define UNWRAP_STRUCT_INNER(StructType, StructName, ...) \ + { \ + const StructName *in = (const StructName *)nextInput; \ + StructName *out = (StructName *)tempMem; \ + \ + /* copy the struct */ \ + *out = *in; \ + /* abuse comma operator to unwrap all members */ \ + __VA_ARGS__; \ + \ + AppendModifiedChainedStruct(tempMem, out, nextChainTail); \ + } + +#undef UNWRAP_STRUCT +#define UNWRAP_STRUCT(StructType, StructName, ...) \ + case StructType: \ + { \ + UNWRAP_STRUCT_INNER(StructType, StructName, __VA_ARGS__) \ + break; \ + } + +#undef UNWRAP_STRUCT_CAPTURE_ONLY +#define UNWRAP_STRUCT_CAPTURE_ONLY(StructType, StructName, ...) \ + case StructType: \ + { \ + if(IsCaptureMode(state)) \ + { \ + UNWRAP_STRUCT_INNER(StructType, StructName, __VA_ARGS__) \ + } \ + break; \ + } + + // start with an empty chain. Every call to AppendModifiedChainedStruct / CopyNextChainedStruct + // pushes on a new entry, but if there's only one entry in the list and it's one we want to skip, + // this needs to start at NULL. + nextChainTail->pNext = NULL; + while(nextInput) + { + switch(nextInput->sType) + { + PROCESS_SIMPLE_STRUCTS(); + + // complex structs to handle - require multiple allocations + case VK_STRUCTURE_TYPE_BIND_SPARSE_INFO: + { + const VkBindSparseInfo *in = (const VkBindSparseInfo *)nextInput; + VkBindSparseInfo *out = (VkBindSparseInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped arrays + VkSemaphore *outWaitSemaphores = (VkSemaphore *)tempMem; + tempMem += sizeof(VkSemaphore) * in->waitSemaphoreCount; + VkSemaphore *outSignalSemaphores = (VkSemaphore *)tempMem; + tempMem += sizeof(VkSemaphore) * in->signalSemaphoreCount; + VkSparseBufferMemoryBindInfo *outBufferBinds = (VkSparseBufferMemoryBindInfo *)tempMem; + tempMem += sizeof(VkSparseBufferMemoryBindInfo) * in->bufferBindCount; + VkSparseImageOpaqueMemoryBindInfo *outImageOpaqueBinds = + (VkSparseImageOpaqueMemoryBindInfo *)tempMem; + tempMem += sizeof(VkSparseImageOpaqueMemoryBindInfo) * in->imageOpaqueBindCount; + VkSparseImageMemoryBindInfo *outImageBinds = (VkSparseImageMemoryBindInfo *)tempMem; + tempMem += sizeof(VkSparseImageMemoryBindInfo) * in->imageBindCount; + + *out = *in; + + out->pWaitSemaphores = outWaitSemaphores; + out->pSignalSemaphores = outSignalSemaphores; + out->pBufferBinds = outBufferBinds; + out->pImageOpaqueBinds = outImageOpaqueBinds; + out->pImageBinds = outImageBinds; + + for(uint32_t i = 0; i < in->waitSemaphoreCount; i++) + outWaitSemaphores[i] = Unwrap(in->pWaitSemaphores[i]); + for(uint32_t i = 0; i < in->signalSemaphoreCount; i++) + outSignalSemaphores[i] = Unwrap(in->pSignalSemaphores[i]); + + VkSparseMemoryBind *outMemoryBinds = (VkSparseMemoryBind *)tempMem; + + for(uint32_t i = 0; i < in->bufferBindCount; i++) + { + outBufferBinds[i] = in->pBufferBinds[i]; + UnwrapInPlace(outBufferBinds[i].buffer); + + outBufferBinds[i].pBinds = outMemoryBinds; + + for(uint32_t b = 0; b < outBufferBinds[i].bindCount; b++) + { + outMemoryBinds[b] = in->pBufferBinds[i].pBinds[b]; + UnwrapInPlace(outMemoryBinds[b].memory); + } + + outMemoryBinds += outBufferBinds[i].bindCount; + tempMem += outBufferBinds[i].bindCount * sizeof(VkSparseMemoryBind); + } + + for(uint32_t i = 0; i < in->imageOpaqueBindCount; i++) + { + outImageOpaqueBinds[i] = in->pImageOpaqueBinds[i]; + UnwrapInPlace(outImageOpaqueBinds[i].image); + + outImageOpaqueBinds[i].pBinds = outMemoryBinds; + + for(uint32_t b = 0; b < outBufferBinds[i].bindCount; b++) + { + outMemoryBinds[b] = in->pImageOpaqueBinds[i].pBinds[b]; + UnwrapInPlace(outMemoryBinds[b].memory); + } + + outMemoryBinds += outImageOpaqueBinds[i].bindCount; + tempMem += outImageOpaqueBinds[i].bindCount * sizeof(VkSparseMemoryBind); + } + + VkSparseImageMemoryBind *outImageMemoryBinds = (VkSparseImageMemoryBind *)tempMem; + + for(uint32_t i = 0; i < in->imageBindCount; i++) + { + outImageBinds[i] = in->pImageBinds[i]; + UnwrapInPlace(outImageBinds[i].image); + + outImageBinds[i].pBinds = outImageMemoryBinds; + + for(uint32_t b = 0; b < outBufferBinds[i].bindCount; b++) + { + outImageMemoryBinds[b] = in->pImageBinds[i].pBinds[b]; + UnwrapInPlace(outImageMemoryBinds[b].memory); + } + + outImageMemoryBinds += outImageBinds[i].bindCount; + tempMem += outImageBinds[i].bindCount * sizeof(VkSparseMemoryBind); + } + + break; + } + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO: + { + const VkDescriptorSetAllocateInfo *in = (const VkDescriptorSetAllocateInfo *)nextInput; + VkDescriptorSetAllocateInfo *out = (VkDescriptorSetAllocateInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped array + VkDescriptorSetLayout *outLayouts = (VkDescriptorSetLayout *)tempMem; + tempMem += sizeof(VkDescriptorSetLayout) * in->descriptorSetCount; + + *out = *in; + UnwrapInPlace(out->descriptorPool); + + out->pSetLayouts = outLayouts; + for(uint32_t i = 0; i < in->descriptorSetCount; i++) + outLayouts[i] = Unwrap(in->pSetLayouts[i]); + + break; + } + case VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO: + { + const VkDescriptorSetLayoutCreateInfo *in = + (const VkDescriptorSetLayoutCreateInfo *)nextInput; + VkDescriptorSetLayoutCreateInfo *out = (VkDescriptorSetLayoutCreateInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped array + VkDescriptorSetLayoutBinding *outBindings = (VkDescriptorSetLayoutBinding *)tempMem; + tempMem += sizeof(VkDescriptorSetLayoutBinding) * in->bindingCount; + VkSampler *outSamplers = (VkSampler *)tempMem; + + *out = *in; + out->pBindings = outBindings; + + for(uint32_t i = 0; i < out->bindingCount; i++) + { + outBindings[i] = in->pBindings[i]; + + if(outBindings[i].pImmutableSamplers) + { + outBindings[i].pImmutableSamplers = outSamplers; + + for(uint32_t d = 0; d < out->pBindings[i].descriptorCount; d++) + outSamplers[d] = Unwrap(in->pBindings[i].pImmutableSamplers[d]); + + tempMem += sizeof(VkSampler) * out->pBindings[i].descriptorCount; + outSamplers += out->pBindings[i].descriptorCount; + } + } + + break; + } + case VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO: + { + const VkDeviceGroupDeviceCreateInfo *in = (const VkDeviceGroupDeviceCreateInfo *)nextInput; + VkDeviceGroupDeviceCreateInfo *out = (VkDeviceGroupDeviceCreateInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped array + VkPhysicalDevice *outDevices = (VkPhysicalDevice *)tempMem; + tempMem += sizeof(VkPhysicalDevice) * in->physicalDeviceCount; + + *out = *in; + out->pPhysicalDevices = outDevices; + + for(uint32_t i = 0; i < in->physicalDeviceCount; i++) + outDevices[i] = Unwrap(in->pPhysicalDevices[i]); + + break; + } + case VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO: + { + const VkFramebufferCreateInfo *in = (const VkFramebufferCreateInfo *)nextInput; + VkFramebufferCreateInfo *out = (VkFramebufferCreateInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped array + VkImageView *outAttachments = (VkImageView *)tempMem; + tempMem += sizeof(VkImageView) * in->attachmentCount; + + *out = *in; + UnwrapInPlace(out->renderPass); + + out->pAttachments = outAttachments; + for(uint32_t i = 0; i < in->attachmentCount; i++) + outAttachments[i] = Unwrap(in->pAttachments[i]); + + break; + } + case VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO: + { + const VkGraphicsPipelineCreateInfo *in = (const VkGraphicsPipelineCreateInfo *)nextInput; + VkGraphicsPipelineCreateInfo *out = (VkGraphicsPipelineCreateInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped array + VkPipelineShaderStageCreateInfo *outShaders = (VkPipelineShaderStageCreateInfo *)tempMem; + tempMem += sizeof(VkPipelineShaderStageCreateInfo) * in->stageCount; + + *out = *in; + UnwrapInPlace(out->layout); + UnwrapInPlace(out->renderPass); + UnwrapInPlace(out->basePipelineHandle); + + out->pStages = outShaders; + for(uint32_t i = 0; i < in->stageCount; i++) + outShaders[i].module = Unwrap(in->pStages[i].module); + + break; + } + case VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO: + { + const VkPipelineLayoutCreateInfo *in = (const VkPipelineLayoutCreateInfo *)nextInput; + VkPipelineLayoutCreateInfo *out = (VkPipelineLayoutCreateInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped array + VkDescriptorSetLayout *outLayouts = (VkDescriptorSetLayout *)tempMem; + tempMem += sizeof(VkDescriptorSetLayout) * in->setLayoutCount; + + *out = *in; + + out->pSetLayouts = outLayouts; + for(uint32_t i = 0; i < in->setLayoutCount; i++) + outLayouts[i] = Unwrap(in->pSetLayouts[i]); + + break; + } + case VK_STRUCTURE_TYPE_PRESENT_INFO_KHR: + { + const VkPresentInfoKHR *in = (const VkPresentInfoKHR *)nextInput; + VkPresentInfoKHR *out = (VkPresentInfoKHR *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped arrays + VkSemaphore *outWaitSemaphores = (VkSemaphore *)tempMem; + tempMem += sizeof(VkSemaphore) * in->waitSemaphoreCount; + VkSwapchainKHR *outSwapchains = (VkSwapchainKHR *)tempMem; + tempMem += sizeof(VkSwapchainKHR) * in->swapchainCount; + + *out = *in; + out->pSwapchains = outSwapchains; + out->pWaitSemaphores = outWaitSemaphores; + + for(uint32_t i = 0; i < in->swapchainCount; i++) + outSwapchains[i] = Unwrap(in->pSwapchains[i]); + for(uint32_t i = 0; i < in->waitSemaphoreCount; i++) + outWaitSemaphores[i] = Unwrap(in->pWaitSemaphores[i]); + + break; + } + case VK_STRUCTURE_TYPE_SUBMIT_INFO: + { + const VkSubmitInfo *in = (const VkSubmitInfo *)nextInput; + VkSubmitInfo *out = (VkSubmitInfo *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // allocate unwrapped arrays + VkSemaphore *outWaitSemaphores = (VkSemaphore *)tempMem; + tempMem += sizeof(VkSemaphore) * in->waitSemaphoreCount; + VkCommandBuffer *outCmdBuffers = (VkCommandBuffer *)tempMem; + tempMem += sizeof(VkCommandBuffer) * in->commandBufferCount; + VkSemaphore *outSignalSemaphores = (VkSemaphore *)tempMem; + tempMem += sizeof(VkSemaphore) * in->signalSemaphoreCount; + + *out = *in; + out->pWaitSemaphores = outWaitSemaphores; + out->pCommandBuffers = outCmdBuffers; + out->pSignalSemaphores = outSignalSemaphores; + + for(uint32_t i = 0; i < in->waitSemaphoreCount; i++) + outWaitSemaphores[i] = Unwrap(in->pWaitSemaphores[i]); + for(uint32_t i = 0; i < in->commandBufferCount; i++) + outCmdBuffers[i] = Unwrap(in->pCommandBuffers[i]); + for(uint32_t i = 0; i < in->signalSemaphoreCount; i++) + outSignalSemaphores[i] = Unwrap(in->pSignalSemaphores[i]); + + break; + } + case VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET: + { + const VkWriteDescriptorSet *in = (const VkWriteDescriptorSet *)nextInput; + VkWriteDescriptorSet *out = (VkWriteDescriptorSet *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + *out = *in; + UnwrapInPlace(out->dstSet); + + switch(out->descriptorType) + { + case VK_DESCRIPTOR_TYPE_SAMPLER: + case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER: + case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: + case VK_DESCRIPTOR_TYPE_STORAGE_IMAGE: + case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT: + { + VkDescriptorImageInfo *outBindings = (VkDescriptorImageInfo *)tempMem; + tempMem += sizeof(VkDescriptorImageInfo) * in->descriptorCount; + + for(uint32_t d = 0; d < in->descriptorCount; d++) + { + outBindings[d] = in->pImageInfo[d]; + UnwrapInPlace(outBindings[d].imageView); + UnwrapInPlace(outBindings[d].sampler); + } + + break; + } + case VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER: + { + VkBufferView *outBindings = (VkBufferView *)tempMem; + tempMem += sizeof(VkBufferView) * in->descriptorCount; + + for(uint32_t d = 0; d < in->descriptorCount; d++) + outBindings[d] = Unwrap(in->pTexelBufferView[d]); + + break; + } + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER: + case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC: + case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC: + { + VkDescriptorBufferInfo *outBindings = (VkDescriptorBufferInfo *)tempMem; + tempMem += sizeof(VkDescriptorBufferInfo) * in->descriptorCount; + + for(uint32_t d = 0; d < in->descriptorCount; d++) + { + outBindings[d] = in->pBufferInfo[d]; + UnwrapInPlace(outBindings[d].buffer); + } + + break; + } + default: RDCERR("Unhandled descriptor type unwrapping VkWriteDescriptorSet"); break; + } + + break; + } + +// NV win32 external memory extensions +#if ENABLED(RDOC_WIN32) + // Structs that can be copied into place + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV, + VkImportMemoryWin32HandleInfoNV); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV, + VkExportMemoryWin32HandleInfoNV); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, + VkImportMemoryWin32HandleInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, + VkExportMemoryWin32HandleInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, + VkMemoryWin32HandlePropertiesKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, + VkExportSemaphoreWin32HandleInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR, + VkD3D12FenceSubmitInfoKHR); + COPY_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR, + VkExportFenceWin32HandleInfoKHR); + + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR, + VkMemoryGetWin32HandleInfoKHR, UnwrapInPlace(out->memory)); + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, + VkImportSemaphoreWin32HandleInfoKHR, + UnwrapInPlace(out->semaphore)); + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR, + VkSemaphoreGetWin32HandleInfoKHR, UnwrapInPlace(out->semaphore)); + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR, + VkImportFenceWin32HandleInfoKHR, UnwrapInPlace(out->fence)); + UNWRAP_STRUCT_CAPTURE_ONLY(VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, + VkFenceGetWin32HandleInfoKHR, UnwrapInPlace(out->fence)); + + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: + { + // strip during replay + if(IsCaptureMode(state)) + { + // KHR and NV structs are identical + const VkWin32KeyedMutexAcquireReleaseInfoKHR *in = + (const VkWin32KeyedMutexAcquireReleaseInfoKHR *)nextInput; + VkWin32KeyedMutexAcquireReleaseInfoKHR *out = + (VkWin32KeyedMutexAcquireReleaseInfoKHR *)tempMem; + + // append immediately so tempMem is incremented + AppendModifiedChainedStruct(tempMem, out, nextChainTail); + + // copy struct across + *out = *in; + + // allocate unwrapped arrays + VkDeviceMemory *unwrappedAcquires = (VkDeviceMemory *)tempMem; + tempMem += sizeof(VkDeviceMemory) * in->acquireCount; + VkDeviceMemory *unwrappedReleases = (VkDeviceMemory *)tempMem; + tempMem += sizeof(VkDeviceMemory) * in->releaseCount; + + // unwrap the arrays + for(uint32_t mem = 0; mem < in->acquireCount; mem++) + unwrappedAcquires[mem] = Unwrap(in->pAcquireSyncs[mem]); + for(uint32_t mem = 0; mem < in->releaseCount; mem++) + unwrappedReleases[mem] = Unwrap(in->pReleaseSyncs[mem]); + + out->pAcquireSyncs = unwrappedAcquires; + out->pReleaseSyncs = unwrappedReleases; + } + break; + } +#else + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV: + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV: + case VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR: + case VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR: + case VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR: + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV: + case VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR: + { + RDCERR("Support for win32 external memory extensions not compiled in"); + nextChainTail->pNext = nextInput; + break; + } +#endif + + case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT: + case VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT: + { + // could be implemented but would need extra work or doesn't make sense right now + RDCERR("Struct %s not handled in %s pNext chain", ToStr(nextInput->sType).c_str(), + structName); + nextChainTail->pNext = nextInput; + break; + } + + UNHANDLED_STRUCTS() + { + RDCERR("Unhandled struct %s in %s pNext chain", ToStr(nextInput->sType).c_str(), + structName); + nextChainTail->pNext = nextInput; + break; + } + + case VK_STRUCTURE_TYPE_RANGE_SIZE: + case VK_STRUCTURE_TYPE_MAX_ENUM: + { + RDCERR("Invalid value %x in %s pNext chain", nextInput->sType, structName); + nextChainTail->pNext = nextInput; + break; + } + } + + nextInput = nextInput->pNext; + } +} diff --git a/renderdoc/driver/vulkan/vk_serialise.cpp b/renderdoc/driver/vulkan/vk_serialise.cpp index 343b2c249..a8c31ce7e 100644 --- a/renderdoc/driver/vulkan/vk_serialise.cpp +++ b/renderdoc/driver/vulkan/vk_serialise.cpp @@ -138,135 +138,588 @@ SERIALISE_VK_HANDLES(); PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR, \ VkImportMemoryWin32HandleInfoKHR) \ PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR, \ - VkImportMemoryWin32HandleInfoKHR) \ + VkExportMemoryWin32HandleInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR, \ + VkMemoryWin32HandlePropertiesKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR, VkMemoryGetWin32HandleInfoKHR) \ \ /* VK_KHR_external_semaphore_win32 */ \ PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, \ VkExportSemaphoreWin32HandleInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR, \ + VkImportSemaphoreWin32HandleInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR, VkD3D12FenceSubmitInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR, \ + VkSemaphoreGetWin32HandleInfoKHR) \ \ /* VK_KHR_external_fence_win32 */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR, VkExportFenceWin32HandleInfoKHR) + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR, VkExportFenceWin32HandleInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR, VkImportFenceWin32HandleInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR, VkFenceGetWin32HandleInfoKHR) #else -#define HANDLE_PNEXT_OS() +#define HANDLE_PNEXT_OS() \ + /* VK_NV_external_memory_win32 */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV) \ + \ + /* VK_NV_win32_keyed_mutex */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV) \ + \ + /* VK_KHR_win32_keyed_mutex */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR) \ + \ + /* VK_KHR_external_memory_win32 */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR) \ + \ + /* VK_KHR_external_semaphore_win32 */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR) \ + \ + /* VK_KHR_external_fence_win32 */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR) #endif // pNext structure type dispatch -#define HANDLE_PNEXT() \ - /* we can ignore all external memory extension structs entirely. We don't need to */ \ - /* serialise or replay it as we won't actually use external memory and will just create */ \ - /* normal memory to replay with. */ \ - \ - /* OS-specific extensions */ \ - HANDLE_PNEXT_OS() \ - \ - /* VK_NV_external_memory */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, VkExportMemoryAllocateInfoNV) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV, \ - VkExternalMemoryImageCreateInfoNV) \ - \ - /* VK_KHR_external_memory / ..._fd */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, VkExportMemoryAllocateInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, VkExternalMemoryImageCreateInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, \ - VkExternalMemoryBufferCreateInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, VkImportMemoryFdInfoKHR) \ - \ - /* VK_KHR_external_semaphore */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, VkExportSemaphoreCreateInfo) \ - \ - /* VK_KHR_external_fence */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, VkExportFenceCreateInfo) \ - \ - /* we don't create real swapchains on replay, so we can ignore surface counters */ \ - /* VK_EXT_display_control */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT, VkSwapchainCounterCreateInfoEXT) \ - \ - /* for now we don't serialise dedicated memory on replay as it's only a performance */ \ - /* hint, and is only required in conjunction with shared memory (which we don't */ \ - /* replay). In future it might be helpful to serialise this for informational purposes. */ \ - \ - /* VK_NV_dedicated_allocation */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, \ - VkDedicatedAllocationMemoryAllocateInfoNV) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV, \ - VkDedicatedAllocationImageCreateInfoNV) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV, \ - VkDedicatedAllocationBufferCreateInfoNV) \ - \ - /* VK_KHR_dedicated_allocation */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, VkMemoryDedicatedAllocateInfo) \ - \ - /* VK_EXT_global_priority */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT, \ - VkDeviceQueueGlobalPriorityCreateInfoEXT) \ - \ - /* for now we don't support ycbcr and force-disable the feature bit, so no-one should try */ \ - /* to pNext any of these structs anyway, but if they do, we ignore them */ \ - /* VK_KHR_sampler_ycbcr_conversion */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, VkBindImagePlaneMemoryInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, VkSamplerYcbcrConversionInfo) \ - \ - /* for now we don't handle true device groups and report all physdevices in separate groups. */ \ - /* So we can safely ignore these structures as redundant/unneeded. */ \ - /* VK_KHR_device_group */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR, \ - VkDeviceGroupSwapchainCreateInfoKHR) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, \ - VkBindImageMemorySwapchainInfoKHR) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR, VkImageSwapchainCreateInfoKHR) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, \ - VkBindImageMemoryDeviceGroupInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, \ - VkBindBufferMemoryDeviceGroupInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, VkDeviceGroupBindSparseInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, VkDeviceGroupSubmitInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, \ - VkDeviceGroupCommandBufferBeginInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, \ - VkDeviceGroupRenderPassBeginInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, VkMemoryAllocateFlagsInfo) \ - \ - /* Vulkan 1.1 - protected memory */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO, VkProtectedSubmitInfo) \ - \ - /* VK_EXT_conservative_rasterization */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, \ - VkPipelineRasterizationConservativeStateCreateInfoEXT) \ - \ - /* VK_KHR_maintenance2 */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, \ - VkPipelineTessellationDomainOriginStateCreateInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, VkImageViewUsageCreateInfo) \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, \ - VkRenderPassInputAttachmentAspectCreateInfo) \ - \ - /* VK_EXT_vertex_attribute_divisor */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT, \ - VkPipelineVertexInputDivisorStateCreateInfoEXT) \ - \ - /* VK_EXT_sampler_filter_minmax */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT, \ - VkSamplerReductionModeCreateInfoEXT) \ - \ - /* VK_KHR_multiview */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, VkRenderPassMultiviewCreateInfo) \ - \ - /* VK_KHR_image_format_list */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, VkImageFormatListCreateInfoKHR) \ - \ - /* VK_EXT_astc_decode_mode */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT, VkImageViewASTCDecodeModeEXT) \ - \ - /* VK_EXT_validation_cache */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT, \ - VkShaderModuleValidationCacheCreateInfoEXT) \ - \ - /* VK_EXT_transform_feedback */ \ - PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, \ - VkPipelineRasterizationStateStreamCreateInfoEXT) +#define HANDLE_PNEXT() \ + /* OS-specific extensions */ \ + HANDLE_PNEXT_OS() \ + \ + /* Core 1.0 structs. Should never be serialised in a pNext chain */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_APPLICATION_INFO, VkApplicationInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO, VkInstanceCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO, VkDeviceQueueCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO, VkDeviceCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SUBMIT_INFO, VkSubmitInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, VkMemoryAllocateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE, VkMappedMemoryRange) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_SPARSE_INFO, VkBindSparseInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_FENCE_CREATE_INFO, VkFenceCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO, VkSemaphoreCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, VkEventCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO, VkQueryPoolCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, VkBufferCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFO, VkBufferViewCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, VkImageCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO, VkImageViewCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO, VkShaderModuleCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, VkPipelineCacheCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, VkPipelineShaderStageCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO, \ + VkPipelineVertexInputStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO, \ + VkPipelineInputAssemblyStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO, \ + VkPipelineTessellationStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO, \ + VkPipelineViewportStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO, \ + VkPipelineRasterizationStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO, \ + VkPipelineMultisampleStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO, \ + VkPipelineDepthStencilStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO, \ + VkPipelineColorBlendStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO, \ + VkPipelineDynamicStateCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO, VkGraphicsPipelineCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO, VkComputePipelineCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO, VkPipelineLayoutCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO, VkSamplerCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO, VkDescriptorSetLayoutCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO, VkDescriptorPoolCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO, VkDescriptorSetAllocateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET, VkWriteDescriptorSet) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_COPY_DESCRIPTOR_SET, VkCopyDescriptorSet) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO, VkFramebufferCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO, VkRenderPassCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO, VkCommandPoolCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO, VkCommandBufferAllocateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_INFO, VkCommandBufferInheritanceInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO, VkCommandBufferBeginInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO, VkRenderPassBeginInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER, VkBufferMemoryBarrier) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER, VkImageMemoryBarrier) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_BARRIER, VkMemoryBarrier) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_LOADER_INSTANCE_CREATE_INFO, VkLayerInstanceCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO, VkLayerDeviceCreateInfo) \ + \ + /* Vulkan 1.1 only, no extension - subgroups, protected memory */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES, \ + VkPhysicalDeviceSubgroupProperties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PROTECTED_SUBMIT_INFO, VkProtectedSubmitInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_INFO_2, VkDeviceQueueInfo2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES, \ + VkPhysicalDeviceProtectedMemoryFeatures) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES, \ + VkPhysicalDeviceProtectedMemoryProperties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES, \ + VkPhysicalDeviceShaderDrawParameterFeatures) \ + \ + /* VK_AMD_shader_core_properties */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD, \ + VkPhysicalDeviceShaderCorePropertiesAMD) \ + \ + /* VK_AMD_texture_gather_bias_lod */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD, \ + VkTextureLODGatherFormatPropertiesAMD) \ + \ + /* VK_EXT_astc_decode_mode */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_ASTC_DECODE_MODE_EXT, VkImageViewASTCDecodeModeEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT, \ + VkPhysicalDeviceASTCDecodeFeaturesEXT) \ + \ + /* VK_EXT_conservative_rasterization */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT, \ + VkPhysicalDeviceConservativeRasterizationPropertiesEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_CONSERVATIVE_STATE_CREATE_INFO_EXT, \ + VkPipelineRasterizationConservativeStateCreateInfoEXT) \ + \ + /* VK_EXT_debug_marker */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT, VkDebugMarkerObjectNameInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT, VkDebugMarkerObjectTagInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT, VkDebugMarkerMarkerInfoEXT) \ + \ + /* VK_EXT_debug_report */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT, \ + VkDebugReportCallbackCreateInfoEXT) \ + \ + /* VK_EXT_debug_utils */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT, VkDebugUtilsObjectNameInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_TAG_INFO_EXT, VkDebugUtilsObjectTagInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT, VkDebugUtilsLabelEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT, \ + VkDebugUtilsMessengerCallbackDataEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT, \ + VkDebugUtilsMessengerCreateInfoEXT) \ + \ + /* VK_EXT_display_control */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT, VkDisplayPowerInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT, VkDeviceEventInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT, VkDisplayEventInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SWAPCHAIN_COUNTER_CREATE_INFO_EXT, VkSwapchainCounterCreateInfoEXT) \ + \ + /* VK_EXT_display_surface_counter */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT, VkSurfaceCapabilities2EXT) \ + \ + /* VK_EXT_global_priority */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_QUEUE_GLOBAL_PRIORITY_CREATE_INFO_EXT, \ + VkDeviceQueueGlobalPriorityCreateInfoEXT) \ + \ + /* VK_EXT_pci_bus_info */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT, \ + VkPhysicalDevicePCIBusInfoPropertiesEXT) \ + \ + /* VK_EXT_sampler_filter_minmax */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT, \ + VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_REDUCTION_MODE_CREATE_INFO_EXT, \ + VkSamplerReductionModeCreateInfoEXT) \ + \ + /* VK_EXT_transform_feedback */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT, \ + VkPhysicalDeviceTransformFeedbackFeaturesEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT, \ + VkPhysicalDeviceTransformFeedbackPropertiesEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT, \ + VkPipelineRasterizationStateStreamCreateInfoEXT) \ + \ + /* VK_EXT_validation_cache */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT, VkValidationCacheCreateInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SHADER_MODULE_VALIDATION_CACHE_CREATE_INFO_EXT, \ + VkShaderModuleValidationCacheCreateInfoEXT) \ + \ + /* VK_EXT_validation_flags */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT, VkValidationFlagsEXT) \ + \ + /* VK_EXT_vertex_attribute_divisor */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT, \ + VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT, \ + VkPipelineVertexInputDivisorStateCreateInfoEXT) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT, \ + VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT) \ + \ + /* VK_KHR_8bit_storage */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR, \ + VkPhysicalDevice8BitStorageFeaturesKHR) \ + \ + /* VK_KHR_16bit_storage */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES, \ + VkPhysicalDevice16BitStorageFeatures) \ + \ + /* VK_KHR_bind_memory2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO, VkBindBufferMemoryInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO, VkBindImageMemoryInfo) \ + \ + /* VK_KHR_create_renderpass2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_ATTACHMENT_DESCRIPTION_2_KHR, VkAttachmentDescription2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_ATTACHMENT_REFERENCE_2_KHR, VkAttachmentReference2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_DESCRIPTION_2_KHR, VkSubpassDescription2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_DEPENDENCY_2_KHR, VkSubpassDependency2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO_2_KHR, VkRenderPassCreateInfo2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_BEGIN_INFO_KHR, VkSubpassBeginInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SUBPASS_END_INFO_KHR, VkSubpassEndInfoKHR) \ + \ + /* VK_KHR_dedicated_allocation */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS, VkMemoryDedicatedRequirements) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO, VkMemoryDedicatedAllocateInfo) \ + \ + /* VK_KHR_descriptor_update_template */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_UPDATE_TEMPLATE_CREATE_INFO, \ + VkDescriptorUpdateTemplateCreateInfo) \ + \ + /* VK_KHR_device_group_creation */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES, VkPhysicalDeviceGroupProperties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO, VkDeviceGroupDeviceCreateInfo) \ + \ + /* VK_KHR_device_group */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_SWAPCHAIN_CREATE_INFO_KHR, VkImageSwapchainCreateInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_DEVICE_GROUP_INFO, \ + VkBindImageMemoryDeviceGroupInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_DEVICE_GROUP_INFO, \ + VkBindBufferMemoryDeviceGroupInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_BIND_SPARSE_INFO, VkDeviceGroupBindSparseInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_SUBMIT_INFO, VkDeviceGroupSubmitInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_COMMAND_BUFFER_BEGIN_INFO, \ + VkDeviceGroupCommandBufferBeginInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_RENDER_PASS_BEGIN_INFO, \ + VkDeviceGroupRenderPassBeginInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO, VkMemoryAllocateFlagsInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_SWAPCHAIN_CREATE_INFO_KHR, \ + VkDeviceGroupSwapchainCreateInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_SWAPCHAIN_INFO_KHR, \ + VkBindImageMemorySwapchainInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR, \ + VkDeviceGroupPresentCapabilitiesKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR, VkDeviceGroupPresentInfoKHR) \ + \ + /* VK_KHR_display_swapchain */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR, VkDisplayPresentInfoKHR) \ + \ + /* VK_KHR_driver_properties */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR, \ + VkPhysicalDeviceDriverPropertiesKHR) \ + \ + /* VK_KHR_external_fence_capabilities */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO, \ + VkPhysicalDeviceExternalFenceInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES, VkExternalFenceProperties) \ + \ + /* VK_KHR_external_fence / ..._fd */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_FENCE_CREATE_INFO, VkExportFenceCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR, VkImportFenceFdInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR, VkFenceGetFdInfoKHR) \ + \ + /* VK_KHR_external_memory_capabilities */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO, \ + VkPhysicalDeviceExternalImageFormatInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES, VkExternalImageFormatProperties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO, \ + VkPhysicalDeviceExternalBufferInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES, VkExternalBufferProperties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES, VkPhysicalDeviceIDProperties) \ + \ + /* VK_KHR_external_memory / ..._fd */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO, VkExportMemoryAllocateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, VkExternalMemoryImageCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_BUFFER_CREATE_INFO, \ + VkExternalMemoryBufferCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR, VkImportMemoryFdInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR, VkMemoryFdPropertiesKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR, VkMemoryGetFdInfoKHR) \ + \ + /* VK_KHR_external_semaphore_capabilities */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO, \ + VkPhysicalDeviceExternalSemaphoreInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES, VkExternalSemaphoreProperties) \ + \ + /* VK_KHR_external_semaphore / ..._fd */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_CREATE_INFO, VkExportSemaphoreCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR, VkImportSemaphoreFdInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR, VkSemaphoreGetFdInfoKHR) \ + \ + /* VK_KHR_get_display_properties2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR, VkDisplayProperties2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR, VkDisplayPlaneProperties2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR, VkDisplayModeProperties2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR, VkDisplayPlaneInfo2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR, VkDisplayPlaneCapabilities2KHR) \ + \ + /* VK_KHR_get_memory_requirements2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2, VkBufferMemoryRequirementsInfo2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2, VkImageMemoryRequirementsInfo2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2, \ + VkImageSparseMemoryRequirementsInfo2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2, VkMemoryRequirements2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2, \ + VkSparseImageMemoryRequirements2) \ + \ + /* VK_KHR_get_physical_device_properties2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, VkPhysicalDeviceFeatures2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, VkPhysicalDeviceProperties2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2, VkFormatProperties2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2, VkImageFormatProperties2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, \ + VkPhysicalDeviceImageFormatInfo2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2, VkQueueFamilyProperties2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2, \ + VkPhysicalDeviceMemoryProperties2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2, VkSparseImageFormatProperties2) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2, \ + VkPhysicalDeviceSparseImageFormatInfo2) \ + \ + /* VK_KHR_get_surface_capabilities2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR, VkPhysicalDeviceSurfaceInfo2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR, VkSurfaceCapabilities2KHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR, VkSurfaceFormat2KHR) \ + \ + /* VK_KHR_image_format_list */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_FORMAT_LIST_CREATE_INFO_KHR, VkImageFormatListCreateInfoKHR) \ + \ + /* VK_KHR_incremental_present */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR, VkPresentRegionsKHR) \ + \ + /* VK_KHR_maintenance2 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES, \ + VkPhysicalDevicePointClippingProperties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO, \ + VkRenderPassInputAttachmentAspectCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO, VkImageViewUsageCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO, \ + VkPipelineTessellationDomainOriginStateCreateInfo) \ + \ + /* VK_KHR_maintenance3 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES, \ + VkPhysicalDeviceMaintenance3Properties) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT, VkDescriptorSetLayoutSupport) \ + \ + /* VK_KHR_multiview */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_RENDER_PASS_MULTIVIEW_CREATE_INFO, VkRenderPassMultiviewCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES, \ + VkPhysicalDeviceMultiviewFeatures) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES, \ + VkPhysicalDeviceMultiviewProperties) \ + \ + /* VK_KHR_push_descriptor */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR, \ + VkPhysicalDevicePushDescriptorPropertiesKHR) \ + \ + /* VK_KHR_sampler_ycbcr_conversion */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_CREATE_INFO, \ + VkSamplerYcbcrConversionCreateInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_INFO, VkSamplerYcbcrConversionInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_BIND_IMAGE_PLANE_MEMORY_INFO, VkBindImagePlaneMemoryInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO, \ + VkImagePlaneMemoryRequirementsInfo) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES, \ + VkPhysicalDeviceSamplerYcbcrConversionFeatures) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES, \ + VkSamplerYcbcrConversionImageFormatProperties) \ + \ + /* VK_KHR_shader_atomic_int64 */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR, \ + VkPhysicalDeviceShaderAtomicInt64FeaturesKHR) \ + \ + /* VK_KHR_shared_presentable_image */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR, \ + VkSharedPresentSurfaceCapabilitiesKHR) \ + \ + /* VK_KHR_swapchain */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR, VkSwapchainCreateInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PRESENT_INFO_KHR, VkPresentInfoKHR) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR, VkAcquireNextImageInfoKHR) \ + \ + /* VK_KHR_variable_pointers */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES, \ + VkPhysicalDeviceVariablePointerFeatures) \ + \ + /* VK_KHR_vulkan_memory_model */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR, \ + VkPhysicalDeviceVulkanMemoryModelFeaturesKHR) \ + \ + /* VK_NV_dedicated_allocation */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_MEMORY_ALLOCATE_INFO_NV, \ + VkDedicatedAllocationMemoryAllocateInfoNV) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_IMAGE_CREATE_INFO_NV, \ + VkDedicatedAllocationImageCreateInfoNV) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_DEDICATED_ALLOCATION_BUFFER_CREATE_INFO_NV, \ + VkDedicatedAllocationBufferCreateInfoNV) \ + \ + /* VK_NV_external_memory */ \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV, VkExportMemoryAllocateInfoNV) \ + PNEXT_STRUCT(VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV, \ + VkExternalMemoryImageCreateInfoNV) \ + \ + /* Surface creation structs. These would pull in dependencies on OS-specific includes. */ \ + /* So treat them as unsupported. */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR) \ + \ + /* VK_AMD_memory_overallocation_behavior */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DEVICE_MEMORY_OVERALLOCATION_CREATE_INFO_AMD) \ + \ + /* VK_AMD_rasterization_order */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD) \ + \ + /* VK_ANDROID_external_memory_android_hardware_buffer */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID) \ + \ + /* VK_EXT_blend_operation_advanced */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_FEATURES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_BLEND_OPERATION_ADVANCED_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_ADVANCED_STATE_CREATE_INFO_EXT) \ + \ + /* VK_EXT_calibrated_timestamps */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_CALIBRATED_TIMESTAMP_INFO_EXT) \ + \ + /* VK_EXT_conditional_rendering */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_COMMAND_BUFFER_INHERITANCE_CONDITIONAL_RENDERING_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONDITIONAL_RENDERING_FEATURES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_CONDITIONAL_RENDERING_BEGIN_INFO_EXT) \ + \ + /* VK_EXT_descriptor_indexing */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_FEATURES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DESCRIPTOR_INDEXING_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_ALLOCATE_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT_EXT) \ + \ + /* VK_EXT_discard_rectangles */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISCARD_RECTANGLE_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_DISCARD_RECTANGLE_STATE_CREATE_INFO_EXT) \ + \ + /* VK_EXT_external_memory_host */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MEMORY_HOST_POINTER_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_MEMORY_HOST_PROPERTIES_EXT) \ + \ + /* VK_EXT_hdr_metadata */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_HDR_METADATA_EXT) \ + \ + /* VK_EXT_image_drm_format_modifier */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_LIST_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_DRM_FORMAT_MODIFIER_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_EXPLICIT_CREATE_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT) \ + \ + /* VK_EXT_inline_uniform_block */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_FEATURES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_INLINE_UNIFORM_BLOCK_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_INLINE_UNIFORM_BLOCK_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_INLINE_UNIFORM_BLOCK_CREATE_INFO_EXT) \ + \ + /* VK_EXT_sample_locations */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_RENDER_PASS_SAMPLE_LOCATIONS_BEGIN_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_SAMPLE_LOCATIONS_STATE_CREATE_INFO_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLE_LOCATIONS_PROPERTIES_EXT) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_MULTISAMPLE_PROPERTIES_EXT) \ + \ + /* VK_EXT_scalar_block_layout */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SCALAR_BLOCK_LAYOUT_FEATURES_EXT) \ + \ + /* VK_EXT_separate_stencil_usage */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_IMAGE_STENCIL_USAGE_CREATE_INFO_EXT) \ + \ + /* VK_GOOGLE_display_timing */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE) \ + \ + /* VK_NV_clip_space_w_scaling */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_W_SCALING_STATE_CREATE_INFO_NV) \ + \ + /* VK_NV_compute_shader_derivatives */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COMPUTE_SHADER_DERIVATIVES_FEATURES_NV) \ + \ + /* VK_NV_corner_sampled_image */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV) \ + \ + /* VK_NV_device_diagnostic_checkpoints */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_QUEUE_FAMILY_CHECKPOINT_PROPERTIES_NV) \ + \ + /* VK_NV_fragment_coverage_to_color */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_TO_COLOR_STATE_CREATE_INFO_NV) \ + \ + /* VK_NV_fragment_shader_barycentric */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FRAGMENT_SHADER_BARYCENTRIC_FEATURES_NV) \ + \ + /* VK_NV_framebuffer_mixed_samples */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_COVERAGE_MODULATION_STATE_CREATE_INFO_NV) \ + \ + /* VK_NV_mesh_shader */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_FEATURES_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MESH_SHADER_PROPERTIES_NV) \ + \ + /* VK_NV_ray_tracing */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_RAY_TRACING_PIPELINE_CREATE_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_CREATE_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_GEOMETRY_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_GEOMETRY_TRIANGLES_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_GEOMETRY_AABB_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_BIND_ACCELERATION_STRUCTURE_MEMORY_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET_ACCELERATION_STRUCTURE_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_MEMORY_REQUIREMENTS_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_RAY_TRACING_PROPERTIES_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_RAY_TRACING_SHADER_GROUP_CREATE_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_INFO_NV) \ + \ + /* VK_NV_representative_fragment_test */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_REPRESENTATIVE_FRAGMENT_TEST_FEATURES_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_REPRESENTATIVE_FRAGMENT_TEST_STATE_CREATE_INFO_NV) \ + \ + /* VK_NV_scissor_exclusive */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_EXCLUSIVE_SCISSOR_STATE_CREATE_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXCLUSIVE_SCISSOR_FEATURES_NV) \ + \ + /* VK_NV_shader_image_footprint */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_IMAGE_FOOTPRINT_FEATURES_NV) \ + \ + /* VK_NV_shading_rate_image */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SHADING_RATE_IMAGE_STATE_CREATE_INFO_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_FEATURES_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADING_RATE_IMAGE_PROPERTIES_NV) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_COARSE_SAMPLE_ORDER_STATE_CREATE_INFO_NV) \ + \ + /* VK_NV_viewport_swizzle */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_SWIZZLE_STATE_CREATE_INFO_NV) \ + \ + /* VK_NVX_device_generated_commands */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_OBJECT_TABLE_CREATE_INFO_NVX) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_INDIRECT_COMMANDS_LAYOUT_CREATE_INFO_NVX) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_CMD_PROCESS_COMMANDS_INFO_NVX) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_CMD_RESERVE_SPACE_FOR_COMMANDS_INFO_NVX) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_LIMITS_NVX) \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_DEVICE_GENERATED_COMMANDS_FEATURES_NVX) \ + \ + /* VK_NVX_multiview_per_view_attributes */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PER_VIEW_ATTRIBUTES_PROPERTIES_NVX) template static void SerialiseNext(SerialiserType &ser, VkStructureType &sType, const void *&pNext) @@ -297,6 +750,14 @@ static void SerialiseNext(SerialiserType &ser, VkStructureType &sType, const voi // thing user-facing. ser.Named("pNextType").Hidden(); +#define PNEXT_UNSUPPORTED(StructType) \ + case StructType: \ + { \ + RDCERR("No support for " #StructType " is available in this build"); \ + pNext = NULL; \ + break; \ + } + // if we come across a struct we should process, then serialise a pointer to it. #define PNEXT_STRUCT(StructType, StructName) \ case StructType: \ @@ -304,21 +765,26 @@ static void SerialiseNext(SerialiserType &ser, VkStructureType &sType, const voi StructName *nextStruct = NULL; \ ser.SerialiseNullable("pNext", nextStruct); \ pNext = nextStruct; \ + handled = true; \ break; \ } + // we don't want a default case to ensure we get a compile error if we forget to implement a + // structure type, but we also want to error if the input is invalid, so have this flag here. + bool handled = false; + // this serialises the pNext with the right type, as nullable. We already know from above that // there IS something here, so the nullable is redundant but convenient switch(*nextType) { HANDLE_PNEXT(); - default: - { - RDCERR("Unexpected/unhandled next structure type %s", ToStr(*nextType).c_str()); - break; - } + case VK_STRUCTURE_TYPE_RANGE_SIZE: + case VK_STRUCTURE_TYPE_MAX_ENUM: break; } + if(!handled) + RDCERR("Invalid next structure sType: %x", *nextType); + // delete the type itself. Any pNext we serialised is saved in the pNext pointer and will be // deleted in DeserialiseNext() delete nextType; @@ -328,6 +794,14 @@ static void SerialiseNext(SerialiserType &ser, VkStructureType &sType, const voi } else // ser.IsWriting() { +#undef PNEXT_UNSUPPORTED +#define PNEXT_UNSUPPORTED(StructType) \ + case StructType: \ + { \ + RDCERR("No support for " #StructType " is available in this build"); \ + return; \ + } + // if we come across a struct we should process, then serialise a pointer to its type (to tell the // reading serialisation what struct is coming up), then a pointer to it. // We don't have to go any further, the act of serialising this struct will walk the chain further, @@ -340,9 +814,14 @@ static void SerialiseNext(SerialiserType &ser, VkStructureType &sType, const voi ser.SerialiseNullable("pNextType", nextType); \ StructName *actual = (StructName *)next; \ ser.SerialiseNullable("pNext", actual); \ + handled = true; \ return; \ } + // we don't want a default case to ensure we get a compile error if we forget to implement a + // structure type, but we also want to error if the input is invalid, so have this flag here. + bool handled = false; + // walk the pNext chain, skipping any structs we don't care about serialising. VkBaseInStructure *next = (VkBaseInStructure *)pNext; @@ -351,13 +830,13 @@ static void SerialiseNext(SerialiserType &ser, VkStructureType &sType, const voi switch(next->sType) { HANDLE_PNEXT(); - default: - { - RDCERR("Unrecognised extension structure type %s", ToStr(next->sType).c_str()); - break; - } + case VK_STRUCTURE_TYPE_RANGE_SIZE: + case VK_STRUCTURE_TYPE_MAX_ENUM: break; } + if(!handled) + RDCERR("Invalid pNext structure sType: %x", next->sType); + // walk to the next item if we didn't serialise the current one next = (VkBaseInStructure *)next->pNext; } @@ -382,23 +861,94 @@ static inline void DeserialiseNext(const void *pNext) if(pNext == NULL) return; +#undef PNEXT_STRUCT +#define PNEXT_STRUCT(StructType, StructName) \ + case StructType: \ + { \ + VkStructureType *nextType = (VkStructureType *)gen; \ + Deserialise(nextType); \ + return; \ + } + // walk the chain, deserialising from the tail back const VkBaseInStructure *gen = (const VkBaseInStructure *)pNext; - DeserialiseNext(gen->pNext); + switch(gen->sType) + { + HANDLE_PNEXT(); + case VK_STRUCTURE_TYPE_RANGE_SIZE: + case VK_STRUCTURE_TYPE_MAX_ENUM: DeserialiseNext(gen); break; + } delete gen; } +template +void DoSerialise(SerialiserType &ser, VkApplicationInfo &el) +{ + RDCERR("Serialising VkApplicationInfo - this should always be a NULL optional element"); +} + +template +void DoSerialise(SerialiserType &ser, VkInstanceCreateInfo &el) +{ + RDCERR("Serialising VkInstanceCreateInfo - this should always be a NULL optional element"); +} + +template +void DoSerialise(SerialiserType &ser, VkLayerInstanceCreateInfo &el) +{ + RDCERR("Serialising VkLayerInstanceCreateInfo - this should always be a NULL optional element"); +} + +template +void DoSerialise(SerialiserType &ser, VkLayerDeviceCreateInfo &el) +{ + RDCERR("Serialising VkLayerDeviceCreateInfo - this should always be a NULL optional element"); +} + template void DoSerialise(SerialiserType &ser, VkAllocationCallbacks &el) { RDCERR("Serialising VkAllocationCallbacks - this should always be a NULL optional element"); } +template +void DoSerialise(SerialiserType &ser, VkDebugMarkerObjectNameInfoEXT &el) +{ + RDCERR("Serialising VkDebugMarkerObjectNameInfoEXT - this should be handled specially"); + // can't handle it here without duplicating objectType logic +} + +template +void DoSerialise(SerialiserType &ser, VkDebugMarkerObjectTagInfoEXT &el) +{ + RDCERR("Serialising VkDebugMarkerObjectTagInfoEXT - this should be handled specially"); + // can't handle it here without duplicating objectType logic +} + +template +void DoSerialise(SerialiserType &ser, VkDebugUtilsObjectNameInfoEXT &el) +{ + RDCERR("Serialising VkDebugUtilsObjectNameInfoEXT - this should be handled specially"); + // can't handle it here without duplicating objectType logic +} + +template <> +void Deserialise(const VkDebugUtilsObjectNameInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDebugUtilsObjectTagInfoEXT &el) +{ + RDCERR("Serialising VkDebugUtilsObjectTagInfoEXT - this should be handled specially"); + // can't handle it here without duplicating objectType logic +} + template void DoSerialise(SerialiserType &ser, VkDeviceQueueCreateInfo &el) { - if(ser.IsWriting() && el.sType != VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO) - RDCWARN("sType not set properly: %u", el.sType); + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO); SerialiseNext(ser, el.sType, el.pNext); SERIALISE_MEMBER_TYPED(VkDeviceQueueCreateFlagBits, flags); @@ -407,6 +957,13 @@ void DoSerialise(SerialiserType &ser, VkDeviceQueueCreateInfo &el) SERIALISE_MEMBER_ARRAY(pQueuePriorities, queueCount); } +template <> +void Deserialise(const VkDeviceQueueCreateInfo &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pQueuePriorities; +} + // technically this doesn't need a serialise function as it's POD, // but we give it one just for ease of printing etc. template @@ -665,10 +1222,7 @@ void Deserialise(const VkDeviceCreateInfo &el) { DeserialiseNext(el.pNext); for(uint32_t i = 0; i < el.queueCreateInfoCount; i++) - { - DeserialiseNext(el.pQueueCreateInfos[i].pNext); - delete[] el.pQueueCreateInfos[i].pQueuePriorities; - } + Deserialise(el.pQueueCreateInfos[i]); delete[] el.pQueueCreateInfos; delete[] el.ppEnabledExtensionNames; delete[] el.ppEnabledLayerNames; @@ -812,6 +1366,12 @@ void DoSerialise(SerialiserType &ser, VkSparseBufferMemoryBindInfo &el) SERIALISE_MEMBER_ARRAY(pBinds, bindCount); } +template <> +void Deserialise(const VkSparseBufferMemoryBindInfo &el) +{ + delete[] el.pBinds; +} + template void DoSerialise(SerialiserType &ser, VkSparseImageOpaqueMemoryBindInfo &el) { @@ -820,6 +1380,12 @@ void DoSerialise(SerialiserType &ser, VkSparseImageOpaqueMemoryBindInfo &el) SERIALISE_MEMBER_ARRAY(pBinds, bindCount); } +template <> +void Deserialise(const VkSparseImageOpaqueMemoryBindInfo &el) +{ + delete[] el.pBinds; +} + template void DoSerialise(SerialiserType &ser, VkSparseImageMemoryBind &el) { @@ -839,6 +1405,12 @@ void DoSerialise(SerialiserType &ser, VkSparseImageMemoryBindInfo &el) SERIALISE_MEMBER_ARRAY(pBinds, bindCount); } +template <> +void Deserialise(const VkSparseImageMemoryBindInfo &el) +{ + delete[] el.pBinds; +} + template void DoSerialise(SerialiserType &ser, VkBindSparseInfo &el) { @@ -865,13 +1437,13 @@ void Deserialise(const VkBindSparseInfo &el) DeserialiseNext(el.pNext); delete[] el.pWaitSemaphores; for(uint32_t i = 0; i < el.bufferBindCount; i++) - delete[] el.pBufferBinds[i].pBinds; + Deserialise(el.pBufferBinds[i]); delete[] el.pBufferBinds; for(uint32_t i = 0; i < el.imageOpaqueBindCount; i++) - delete[] el.pImageOpaqueBinds[i].pBinds; + Deserialise(el.pImageOpaqueBinds[i]); delete[] el.pImageOpaqueBinds; for(uint32_t i = 0; i < el.imageBindCount; i++) - delete[] el.pImageBinds[i].pBinds; + Deserialise(el.pImageBinds[i]); delete[] el.pImageBinds; delete[] el.pSignalSemaphores; } @@ -966,6 +1538,16 @@ void DoSerialise(SerialiserType &ser, VkSubpassDescription &el) SERIALISE_MEMBER_ARRAY(pPreserveAttachments, preserveAttachmentCount); } +template <> +void Deserialise(const VkSubpassDescription &el) +{ + delete[] el.pInputAttachments; + delete[] el.pColorAttachments; + delete[] el.pResolveAttachments; + delete el.pDepthStencilAttachment; + delete[] el.pPreserveAttachments; +} + template void DoSerialise(SerialiserType &ser, VkSubpassDependency &el) { @@ -1006,14 +1588,7 @@ void Deserialise(const VkRenderPassCreateInfo &el) DeserialiseNext(el.pNext); delete[] el.pAttachments; for(uint32_t i = 0; i < el.subpassCount; i++) - { - delete el.pSubpasses[i].pDepthStencilAttachment; - delete[] el.pSubpasses[i].pInputAttachments; - delete[] el.pSubpasses[i].pColorAttachments; - delete[] el.pSubpasses[i].pResolveAttachments; - if(el.pSubpasses[i].pPreserveAttachments) - delete[] el.pSubpasses[i].pPreserveAttachments; - } + Deserialise(el.pSubpasses[i]); delete[] el.pSubpasses; delete[] el.pDependencies; } @@ -1068,6 +1643,14 @@ void DoSerialise(SerialiserType &ser, VkPipelineVertexInputStateCreateInfo &el) SERIALISE_MEMBER_ARRAY(pVertexAttributeDescriptions, vertexAttributeDescriptionCount); } +template <> +void Deserialise(const VkPipelineVertexInputStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pVertexBindingDescriptions; + delete[] el.pVertexAttributeDescriptions; +} + template void DoSerialise(SerialiserType &ser, VkPipelineInputAssemblyStateCreateInfo &el) { @@ -1080,6 +1663,12 @@ void DoSerialise(SerialiserType &ser, VkPipelineInputAssemblyStateCreateInfo &el SERIALISE_MEMBER(primitiveRestartEnable); } +template <> +void Deserialise(const VkPipelineInputAssemblyStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineTessellationStateCreateInfo &el) { @@ -1090,6 +1679,12 @@ void DoSerialise(SerialiserType &ser, VkPipelineTessellationStateCreateInfo &el) SERIALISE_MEMBER(patchControlPoints); } +template <> +void Deserialise(const VkPipelineTessellationStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineViewportStateCreateInfo &el) { @@ -1104,6 +1699,14 @@ void DoSerialise(SerialiserType &ser, VkPipelineViewportStateCreateInfo &el) SERIALISE_MEMBER_ARRAY(pScissors, scissorCount); } +template <> +void Deserialise(const VkPipelineViewportStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pViewports; + delete[] el.pScissors; +} + template void DoSerialise(SerialiserType &ser, VkPipelineRasterizationStateCreateInfo &el) { @@ -1124,6 +1727,12 @@ void DoSerialise(SerialiserType &ser, VkPipelineRasterizationStateCreateInfo &el SERIALISE_MEMBER(lineWidth); } +template <> +void Deserialise(const VkPipelineRasterizationStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineMultisampleStateCreateInfo &el) { @@ -1140,6 +1749,13 @@ void DoSerialise(SerialiserType &ser, VkPipelineMultisampleStateCreateInfo &el) SERIALISE_MEMBER(alphaToOneEnable); } +template <> +void Deserialise(const VkPipelineMultisampleStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); + delete el.pSampleMask; +} + template void DoSerialise(SerialiserType &ser, VkPipelineColorBlendAttachmentState &el) { @@ -1167,6 +1783,13 @@ void DoSerialise(SerialiserType &ser, VkPipelineColorBlendStateCreateInfo &el) SERIALISE_MEMBER(blendConstants); } +template <> +void Deserialise(const VkPipelineColorBlendStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pAttachments; +} + template void DoSerialise(SerialiserType &ser, VkPipelineDepthStencilStateCreateInfo &el) { @@ -1186,6 +1809,12 @@ void DoSerialise(SerialiserType &ser, VkPipelineDepthStencilStateCreateInfo &el) SERIALISE_MEMBER(maxDepthBounds); } +template <> +void Deserialise(const VkPipelineDepthStencilStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineDynamicStateCreateInfo &el) { @@ -1197,6 +1826,13 @@ void DoSerialise(SerialiserType &ser, VkPipelineDynamicStateCreateInfo &el) SERIALISE_MEMBER_ARRAY(pDynamicStates, dynamicStateCount); } +template <> +void Deserialise(const VkPipelineDynamicStateCreateInfo &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pDynamicStates; +} + template void DoSerialise(SerialiserType &ser, VkCommandPoolCreateInfo &el) { @@ -1244,6 +1880,12 @@ void DoSerialise(SerialiserType &ser, VkCommandBufferInheritanceInfo &el) SERIALISE_MEMBER_TYPED(VkQueryPipelineStatisticFlagBits, pipelineStatistics); } +template <> +void Deserialise(const VkCommandBufferInheritanceInfo &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkCommandBufferBeginInfo &el) { @@ -1259,7 +1901,7 @@ void Deserialise(const VkCommandBufferBeginInfo &el) { DeserialiseNext(el.pNext); if(el.pInheritanceInfo) - DeserialiseNext(el.pInheritanceInfo->pNext); + Deserialise(*el.pInheritanceInfo); delete el.pInheritanceInfo; } @@ -1381,6 +2023,17 @@ void DoSerialise(SerialiserType &ser, VkPipelineShaderStageCreateInfo &el) SERIALISE_MEMBER_OPT(pSpecializationInfo); } +template <> +void Deserialise(const VkPipelineShaderStageCreateInfo &el) +{ + DeserialiseNext(el.pNext); + if(el.pSpecializationInfo) + { + Deserialise(*el.pSpecializationInfo); + delete el.pSpecializationInfo; + } +} + template void DoSerialise(SerialiserType &ser, VkSpecializationMapEntry &el) { @@ -1414,6 +2067,13 @@ void DoSerialise(SerialiserType &ser, VkSpecializationInfo &el) SERIALISE_MEMBER_ARRAY(pData, dataSize); } +template <> +void Deserialise(const VkSpecializationInfo &el) +{ + FreeAlignedBuffer((byte *)el.pData); + delete[] el.pMapEntries; +} + template void DoSerialise(SerialiserType &ser, VkPipelineCacheCreateInfo &el) { @@ -1638,70 +2298,57 @@ template <> void Deserialise(const VkGraphicsPipelineCreateInfo &el) { DeserialiseNext(el.pNext); + if(el.pVertexInputState) { - DeserialiseNext(el.pVertexInputState->pNext); - delete[] el.pVertexInputState->pVertexBindingDescriptions; - delete[] el.pVertexInputState->pVertexAttributeDescriptions; + Deserialise(*el.pVertexInputState); delete el.pVertexInputState; } + if(el.pInputAssemblyState) { - DeserialiseNext(el.pInputAssemblyState->pNext); + Deserialise(*el.pInputAssemblyState); delete el.pInputAssemblyState; } + if(el.pTessellationState) { - DeserialiseNext(el.pTessellationState->pNext); + Deserialise(*el.pTessellationState); delete el.pTessellationState; } if(el.pViewportState) { - DeserialiseNext(el.pViewportState->pNext); - if(el.pViewportState->pViewports) - delete[] el.pViewportState->pViewports; - if(el.pViewportState->pScissors) - delete[] el.pViewportState->pScissors; + Deserialise(*el.pViewportState); delete el.pViewportState; } if(el.pRasterizationState) { - DeserialiseNext(el.pRasterizationState->pNext); + Deserialise(*el.pRasterizationState); delete el.pRasterizationState; } if(el.pMultisampleState) { - DeserialiseNext(el.pMultisampleState->pNext); - delete el.pMultisampleState->pSampleMask; + Deserialise(*el.pMultisampleState); delete el.pMultisampleState; } if(el.pDepthStencilState) { - DeserialiseNext(el.pDepthStencilState->pNext); + Deserialise(*el.pDepthStencilState); delete el.pDepthStencilState; } if(el.pColorBlendState) { - DeserialiseNext(el.pColorBlendState->pNext); - delete[] el.pColorBlendState->pAttachments; + Deserialise(*el.pColorBlendState); delete el.pColorBlendState; } if(el.pDynamicState) { - DeserialiseNext(el.pDynamicState->pNext); - if(el.pDynamicState->pDynamicStates) - delete[] el.pDynamicState->pDynamicStates; + Deserialise(*el.pDynamicState); delete el.pDynamicState; } for(uint32_t i = 0; i < el.stageCount; i++) { - DeserialiseNext(el.pStages[i].pNext); - if(el.pStages[i].pSpecializationInfo) - { - FreeAlignedBuffer((byte *)el.pStages[i].pSpecializationInfo->pData); - delete[] el.pStages[i].pSpecializationInfo->pMapEntries; - delete el.pStages[i].pSpecializationInfo; - } + Deserialise(el.pStages[i]); } delete[] el.pStages; } @@ -1726,8 +2373,7 @@ void Deserialise(const VkComputePipelineCreateInfo &el) DeserialiseNext(el.stage.pNext); if(el.stage.pSpecializationInfo) { - FreeAlignedBuffer((byte *)(el.stage.pSpecializationInfo->pData)); - delete[] el.stage.pSpecializationInfo->pMapEntries; + Deserialise(*el.stage.pSpecializationInfo); delete el.stage.pSpecializationInfo; } } @@ -1946,6 +2592,12 @@ void DoSerialise(SerialiserType &ser, VkDescriptorSetLayoutBinding &el) SERIALISE_MEMBER_ARRAY(pImmutableSamplers, descriptorCount); } +template <> +void Deserialise(const VkDescriptorSetLayoutBinding &el) +{ + delete[] el.pImmutableSamplers; +} + template void DoSerialise(SerialiserType &ser, VkDescriptorSetLayoutCreateInfo &el) { @@ -2127,6 +2779,21 @@ void DoSerialise(SerialiserType &ser, VkViewport &el) SERIALISE_MEMBER(maxDepth); } +template +void DoSerialise(SerialiserType &ser, VkSharedPresentSurfaceCapabilitiesKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SHARED_PRESENT_SURFACE_CAPABILITIES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkImageUsageFlagBits, sharedPresentSupportedUsageFlags); +} + +template <> +void Deserialise(const VkSharedPresentSurfaceCapabilitiesKHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkSwapchainCreateInfoKHR &el) { @@ -2175,6 +2842,85 @@ void Deserialise(const VkSwapchainCreateInfoKHR &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPresentInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PRESENT_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(waitSemaphoreCount); + SERIALISE_MEMBER_ARRAY(pWaitSemaphores, waitSemaphoreCount); + + SERIALISE_MEMBER(swapchainCount); + SERIALISE_MEMBER_ARRAY_EMPTY(pSwapchains); + SERIALISE_MEMBER_ARRAY(pImageIndices, swapchainCount); + SERIALISE_MEMBER_ARRAY(pResults, swapchainCount); +} + +template <> +void Deserialise(const VkPresentInfoKHR &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pWaitSemaphores; + delete[] el.pSwapchains; + delete[] el.pImageIndices; + delete[] el.pResults; +} + +template +void DoSerialise(SerialiserType &ser, VkAcquireNextImageInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_ACQUIRE_NEXT_IMAGE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + // don't need the swap chain itself + SERIALISE_MEMBER_EMPTY(swapchain); + SERIALISE_MEMBER(timeout); + SERIALISE_MEMBER(semaphore); + SERIALISE_MEMBER(fence); + SERIALISE_MEMBER(deviceMask); +} + +template <> +void Deserialise(const VkAcquireNextImageInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceVariablePointerFeatures &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTER_FEATURES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(variablePointersStorageBuffer); + SERIALISE_MEMBER(variablePointers); +} + +template <> +void Deserialise(const VkPhysicalDeviceVariablePointerFeatures &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceVulkanMemoryModelFeaturesKHR &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_MEMORY_MODEL_FEATURES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(vulkanMemoryModel); + SERIALISE_MEMBER(vulkanMemoryModelDeviceScope); +} + +template <> +void Deserialise(const VkPhysicalDeviceVulkanMemoryModelFeaturesKHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkDebugMarkerMarkerInfoEXT &el) { @@ -2191,6 +2937,99 @@ void Deserialise(const VkDebugMarkerMarkerInfoEXT &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkDebugReportCallbackCreateInfoEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkDebugReportFlagBitsEXT, flags); + + // serialise pointers as uint64 to ensure portability. We can't do much with the values apart from + // display them + uint64_t pfnCallback = (uint64_t)el.pfnCallback; + uint64_t pUserData = (uint64_t)el.pUserData; + ser.Serialise("pfnCallback", pfnCallback); + ser.Serialise("pUserData", pUserData); +} + +template <> +void Deserialise(const VkDebugReportCallbackCreateInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDebugUtilsLabelEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(pLabelName); + SERIALISE_MEMBER(color); +} + +template <> +void Deserialise(const VkDebugUtilsLabelEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDebugUtilsMessengerCallbackDataEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CALLBACK_DATA_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkFlagWithNoBits, flags); + SERIALISE_MEMBER(pMessageIdName); + SERIALISE_MEMBER(messageIdNumber); + SERIALISE_MEMBER(pMessage); + SERIALISE_MEMBER(queueLabelCount); + SERIALISE_MEMBER_ARRAY(pQueueLabels, queueLabelCount); + SERIALISE_MEMBER(cmdBufLabelCount); + SERIALISE_MEMBER_ARRAY(pCmdBufLabels, cmdBufLabelCount); + SERIALISE_MEMBER(objectCount); + SERIALISE_MEMBER_ARRAY(pObjects, objectCount); +} + +template <> +void Deserialise(const VkDebugUtilsMessengerCallbackDataEXT &el) +{ + DeserialiseNext(el.pNext); + + for(uint32_t i = 0; i < el.queueLabelCount; i++) + Deserialise(el.pQueueLabels[i]); + for(uint32_t i = 0; i < el.cmdBufLabelCount; i++) + Deserialise(el.pCmdBufLabels[i]); + for(uint32_t i = 0; i < el.objectCount; i++) + Deserialise(el.pObjects[i]); +} + +template +void DoSerialise(SerialiserType &ser, VkDebugUtilsMessengerCreateInfoEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEBUG_UTILS_MESSENGER_CREATE_INFO_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkFlagWithNoBits, flags); + SERIALISE_MEMBER_TYPED(VkDebugUtilsMessageSeverityFlagBitsEXT, messageSeverity); + SERIALISE_MEMBER_TYPED(VkDebugUtilsMessageTypeFlagBitsEXT, messageType); + + // serialise pointers as uint64 to ensure portability. We can't do much with the values apart from + // display them + uint64_t pfnUserCallback = (uint64_t)el.pfnUserCallback; + uint64_t pUserData = (uint64_t)el.pUserData; + ser.Serialise("pfnUserCallback", pfnUserCallback); + ser.Serialise("pUserData", pUserData); +} + +template <> +void Deserialise(const VkDebugUtilsMessengerCreateInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + // this isn't a real vulkan type, it's our own "anything that could be in a descriptor" // structure that template @@ -2350,6 +3189,30 @@ void Deserialise(const VkBindImageMemoryInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceConservativeRasterizationPropertiesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CONSERVATIVE_RASTERIZATION_PROPERTIES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(primitiveOverestimationSize); + SERIALISE_MEMBER(maxExtraPrimitiveOverestimationSize); + SERIALISE_MEMBER(extraPrimitiveOverestimationSizeGranularity); + SERIALISE_MEMBER(primitiveUnderestimation); + SERIALISE_MEMBER(conservativePointAndLineRasterization); + SERIALISE_MEMBER(degenerateTrianglesRasterized); + SERIALISE_MEMBER(degenerateLinesRasterized); + SERIALISE_MEMBER(fullyCoveredFragmentShaderInputVariable); + SERIALISE_MEMBER(conservativeRasterizationPostDepthCoverage); +} + +template <> +void Deserialise(const VkPhysicalDeviceConservativeRasterizationPropertiesEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineRasterizationConservativeStateCreateInfoEXT &el) { @@ -2407,6 +3270,22 @@ void DoSerialise(SerialiserType &ser, VkInputAttachmentAspectReference &el) SERIALISE_MEMBER_TYPED(VkImageAspectFlagBits, aspectMask); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDevicePointClippingProperties &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_POINT_CLIPPING_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(pointClippingBehavior); +} + +template <> +void Deserialise(const VkPhysicalDevicePointClippingProperties &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkRenderPassInputAttachmentAspectCreateInfo &el) { @@ -2432,6 +3311,22 @@ void DoSerialise(SerialiserType &ser, VkVertexInputBindingDivisorDescriptionEXT SERIALISE_MEMBER(divisor); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(maxVertexAttribDivisor); +} + +template <> +void Deserialise(const VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineVertexInputDivisorStateCreateInfoEXT &el) { @@ -2450,6 +3345,76 @@ void Deserialise(const VkPipelineVertexInputDivisorStateCreateInfoEXT &el) delete[] el.pVertexBindingDivisors; } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(vertexAttributeInstanceRateDivisor); + SERIALISE_MEMBER(vertexAttributeInstanceRateZeroDivisor); +} + +template <> +void Deserialise(const VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDevice8BitStorageFeaturesKHR &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_8BIT_STORAGE_FEATURES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(storageBuffer8BitAccess); + SERIALISE_MEMBER(uniformAndStorageBuffer8BitAccess); + SERIALISE_MEMBER(storagePushConstant8); +} + +template <> +void Deserialise(const VkPhysicalDevice8BitStorageFeaturesKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDevice16BitStorageFeatures &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(storageBuffer16BitAccess); + SERIALISE_MEMBER(uniformAndStorageBuffer16BitAccess); + SERIALISE_MEMBER(storagePushConstant16); + SERIALISE_MEMBER(storageInputOutput16); +} + +template <> +void Deserialise(const VkPhysicalDevice16BitStorageFeatures &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_FILTER_MINMAX_PROPERTIES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(filterMinmaxSingleComponentFormats); + SERIALISE_MEMBER(filterMinmaxImageComponentMapping); +} + +template <> +void Deserialise(const VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkSamplerReductionModeCreateInfoEXT &el) { @@ -2465,22 +3430,6 @@ void Deserialise(const VkSamplerReductionModeCreateInfoEXT &el) DeserialiseNext(el.pNext); } -template -void DoSerialise(SerialiserType &ser, VkDebugUtilsLabelEXT &el) -{ - RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEBUG_UTILS_LABEL_EXT); - SerialiseNext(ser, el.sType, el.pNext); - - SERIALISE_MEMBER(pLabelName); - SERIALISE_MEMBER(color); -} - -template <> -void Deserialise(const VkDebugUtilsLabelEXT &el) -{ - DeserialiseNext(el.pNext); -} - template void DoSerialise(SerialiserType &ser, VkSamplerYcbcrConversionCreateInfo &el) { @@ -2503,6 +3452,38 @@ void Deserialise(const VkSamplerYcbcrConversionCreateInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceMaintenance3Properties &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_3_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(maxPerSetDescriptors); + SERIALISE_MEMBER(maxMemoryAllocationSize); +} + +template <> +void Deserialise(const VkPhysicalDeviceMaintenance3Properties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDescriptorSetLayoutSupport &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(supported); +} + +template <> +void Deserialise(const VkDescriptorSetLayoutSupport &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkRenderPassMultiviewCreateInfo &el) { @@ -2526,6 +3507,123 @@ void Deserialise(const VkRenderPassMultiviewCreateInfo &el) delete[] el.pCorrelationMasks; } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceMultiviewFeatures &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_FEATURES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(multiview); + SERIALISE_MEMBER(multiviewGeometryShader); + SERIALISE_MEMBER(multiviewTessellationShader); +} + +template <> +void Deserialise(const VkPhysicalDeviceMultiviewFeatures &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceMultiviewProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MULTIVIEW_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(maxMultiviewViewCount); + SERIALISE_MEMBER(maxMultiviewInstanceIndex); +} + +template <> +void Deserialise(const VkPhysicalDeviceMultiviewProperties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDevicePushDescriptorPropertiesKHR &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PUSH_DESCRIPTOR_PROPERTIES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(maxPushDescriptors); +} + +template <> +void Deserialise(const VkPhysicalDevicePushDescriptorPropertiesKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceSurfaceInfo2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + // don't need the surface + SERIALISE_MEMBER_EMPTY(surface); +} + +template <> +void Deserialise(const VkPhysicalDeviceSurfaceInfo2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkSurfaceCapabilitiesKHR &el) +{ + SERIALISE_MEMBER(minImageCount); + SERIALISE_MEMBER(maxImageCount); + SERIALISE_MEMBER(currentExtent); + SERIALISE_MEMBER(minImageExtent); + SERIALISE_MEMBER(maxImageExtent); + SERIALISE_MEMBER(maxImageArrayLayers); + SERIALISE_MEMBER_TYPED(VkSurfaceTransformFlagBitsKHR, supportedTransforms); + SERIALISE_MEMBER(currentTransform); + SERIALISE_MEMBER_TYPED(VkCompositeAlphaFlagBitsKHR, supportedCompositeAlpha); + SERIALISE_MEMBER_TYPED(VkImageUsageFlagBits, supportedUsageFlags); +} + +template +void DoSerialise(SerialiserType &ser, VkSurfaceCapabilities2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(surfaceCapabilities); +} + +template <> +void Deserialise(const VkSurfaceCapabilities2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkSurfaceFormatKHR &el) +{ + SERIALISE_MEMBER(format); + SERIALISE_MEMBER(colorSpace); +} + +template +void DoSerialise(SerialiserType &ser, VkSurfaceFormat2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(surfaceFormat); +} + +template <> +void Deserialise(const VkSurfaceFormat2KHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkImageFormatListCreateInfoKHR &el) { @@ -2543,6 +3641,89 @@ void Deserialise(const VkImageFormatListCreateInfoKHR &el) delete[] el.pViewFormats; } +template +void DoSerialise(SerialiserType &ser, VkRectLayerKHR &el) +{ + SERIALISE_MEMBER(offset); + SERIALISE_MEMBER(extent); + SERIALISE_MEMBER(layer); +} + +template +void DoSerialise(SerialiserType &ser, VkPresentRegionKHR &el) +{ + SERIALISE_MEMBER(rectangleCount); + SERIALISE_MEMBER_ARRAY(pRectangles, rectangleCount); +} + +template <> +void Deserialise(const VkPresentRegionKHR &el) +{ + delete[] el.pRectangles; +} + +template +void DoSerialise(SerialiserType &ser, VkPresentRegionsKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PRESENT_REGIONS_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(swapchainCount); + SERIALISE_MEMBER_ARRAY(pRegions, swapchainCount); +} + +template <> +void Deserialise(const VkPresentRegionsKHR &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pRegions; +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceShaderCorePropertiesAMD &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_CORE_PROPERTIES_AMD); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(shaderEngineCount); + SERIALISE_MEMBER(shaderArraysPerEngineCount); + SERIALISE_MEMBER(computeUnitsPerShaderArray); + SERIALISE_MEMBER(simdPerComputeUnit); + SERIALISE_MEMBER(wavefrontsPerSimd); + SERIALISE_MEMBER(wavefrontSize); + SERIALISE_MEMBER(sgprsPerSimd); + SERIALISE_MEMBER(minSgprAllocation); + SERIALISE_MEMBER(maxSgprAllocation); + SERIALISE_MEMBER(sgprAllocationGranularity); + SERIALISE_MEMBER(vgprsPerSimd); + SERIALISE_MEMBER(minVgprAllocation); + SERIALISE_MEMBER(maxVgprAllocation); + SERIALISE_MEMBER(vgprAllocationGranularity); +} + +template <> +void Deserialise(const VkPhysicalDeviceShaderCorePropertiesAMD &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkTextureLODGatherFormatPropertiesAMD &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(supportsTextureGatherLODBiasAMD); +} + +template <> +void Deserialise(const VkTextureLODGatherFormatPropertiesAMD &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkImageViewASTCDecodeModeEXT &el) { @@ -2552,6 +3733,55 @@ void DoSerialise(SerialiserType &ser, VkImageViewASTCDecodeModeEXT &el) SERIALISE_MEMBER(decodeMode); } +template <> +void Deserialise(const VkImageViewASTCDecodeModeEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceASTCDecodeFeaturesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ASTC_DECODE_FEATURES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(decodeModeSharedExponent); +} + +template <> +void Deserialise(const VkPhysicalDeviceASTCDecodeFeaturesEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkValidationCacheCreateInfoEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_VALIDATION_CACHE_CREATE_INFO_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkFlagWithNoBits, flags); + + // don't serialise size_t, otherwise capture/replay between different bit-ness won't work + { + uint64_t initialDataSize = (uint64_t)el.initialDataSize; + ser.Serialise("initialDataSize", initialDataSize); + if(ser.IsReading()) + el.initialDataSize = (size_t)initialDataSize; + } + + // don't serialise the data + // SERIALISE_MEMBER_ARRAY(pInitialData, el.initialDataSize); +} + +template <> +void Deserialise(const VkValidationCacheCreateInfoEXT &el) +{ + DeserialiseNext(el.pNext); + // FreeAlignedBuffer((byte *)el.pInitialData); +} + template void DoSerialise(SerialiserType &ser, VkShaderModuleValidationCacheCreateInfoEXT &el) { @@ -2564,6 +3794,71 @@ void DoSerialise(SerialiserType &ser, VkShaderModuleValidationCacheCreateInfoEXT // SERIALISE_MEMBER(validationCache); } +template <> +void Deserialise(const VkShaderModuleValidationCacheCreateInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkValidationFlagsEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(disabledValidationCheckCount); + SERIALISE_MEMBER_ARRAY(pDisabledValidationChecks, disabledValidationCheckCount); +} + +template <> +void Deserialise(const VkValidationFlagsEXT &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pDisabledValidationChecks; +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceTransformFeedbackFeaturesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_FEATURES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(transformFeedback); + SERIALISE_MEMBER(geometryStreams); +} + +template <> +void Deserialise(const VkPhysicalDeviceTransformFeedbackFeaturesEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceTransformFeedbackPropertiesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(maxTransformFeedbackStreams); + SERIALISE_MEMBER(maxTransformFeedbackBuffers); + SERIALISE_MEMBER(maxTransformFeedbackBufferSize); + SERIALISE_MEMBER(maxTransformFeedbackStreamDataSize); + SERIALISE_MEMBER(maxTransformFeedbackBufferDataSize); + SERIALISE_MEMBER(maxTransformFeedbackBufferDataStride); + SERIALISE_MEMBER(transformFeedbackQueries); + SERIALISE_MEMBER(transformFeedbackStreamsLinesTriangles); + SERIALISE_MEMBER(transformFeedbackRasterizationStreamSelect); + SERIALISE_MEMBER(transformFeedbackDraw); +} + +template <> +void Deserialise(const VkPhysicalDeviceTransformFeedbackPropertiesEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkPipelineRasterizationStateStreamCreateInfoEXT &el) { @@ -2598,6 +3893,12 @@ void DoSerialise(SerialiserType &ser, VkAttachmentDescription2KHR &el) SERIALISE_MEMBER(finalLayout); } +template <> +void Deserialise(const VkAttachmentDescription2KHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkAttachmentReference2KHR &el) { @@ -2609,6 +3910,12 @@ void DoSerialise(SerialiserType &ser, VkAttachmentReference2KHR &el) SERIALISE_MEMBER(aspectMask); } +template <> +void Deserialise(const VkAttachmentReference2KHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkSubpassDescription2KHR &el) { @@ -2632,6 +3939,31 @@ void DoSerialise(SerialiserType &ser, VkSubpassDescription2KHR &el) SERIALISE_MEMBER_ARRAY(pPreserveAttachments, preserveAttachmentCount); } +template <> +void Deserialise(const VkSubpassDescription2KHR &el) +{ + DeserialiseNext(el.pNext); + + if(el.pDepthStencilAttachment) + Deserialise(*el.pDepthStencilAttachment); + delete el.pDepthStencilAttachment; + + for(uint32_t j = 0; j < el.colorAttachmentCount; j++) + { + Deserialise(el.pColorAttachments[j]); + if(el.pResolveAttachments) + Deserialise(el.pResolveAttachments[j]); + } + delete[] el.pColorAttachments; + delete[] el.pResolveAttachments; + + for(uint32_t j = 0; j < el.inputAttachmentCount; j++) + Deserialise(el.pInputAttachments[j]); + + delete[] el.pInputAttachments; + delete[] el.pPreserveAttachments; +} + template void DoSerialise(SerialiserType &ser, VkSubpassDependency2KHR &el) { @@ -2648,6 +3980,12 @@ void DoSerialise(SerialiserType &ser, VkSubpassDependency2KHR &el) SERIALISE_MEMBER(viewOffset); } +template <> +void Deserialise(const VkSubpassDependency2KHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkRenderPassCreateInfo2KHR &el) { @@ -2669,40 +4007,19 @@ template <> void Deserialise(const VkRenderPassCreateInfo2KHR &el) { DeserialiseNext(el.pNext); + for(uint32_t i = 0; i < el.attachmentCount; i++) - { - DeserialiseNext(el.pAttachments[i].pNext); - } + Deserialise(el.pAttachments[i]); delete[] el.pAttachments; + for(uint32_t i = 0; i < el.subpassCount; i++) - { - DeserialiseNext(el.pSubpasses[i].pNext); - - if(el.pSubpasses[i].pDepthStencilAttachment) - DeserialiseNext(el.pSubpasses[i].pDepthStencilAttachment->pNext); - - for(uint32_t j = 0; j < el.pSubpasses[i].colorAttachmentCount; j++) - { - DeserialiseNext(el.pSubpasses[i].pColorAttachments[j].pNext); - if(el.pSubpasses[i].pResolveAttachments) - DeserialiseNext(el.pSubpasses[i].pResolveAttachments[j].pNext); - } - - for(uint32_t j = 0; j < el.pSubpasses[i].inputAttachmentCount; j++) - DeserialiseNext(el.pSubpasses[i].pInputAttachments[j].pNext); - - delete el.pSubpasses[i].pDepthStencilAttachment; - delete[] el.pSubpasses[i].pInputAttachments; - delete[] el.pSubpasses[i].pColorAttachments; - delete[] el.pSubpasses[i].pResolveAttachments; - delete[] el.pSubpasses[i].pPreserveAttachments; - } + Deserialise(el.pSubpasses[i]); delete[] el.pSubpasses; + for(uint32_t i = 0; i < el.dependencyCount; i++) - { - DeserialiseNext(el.pDependencies[i].pNext); - } + Deserialise(el.pDependencies[i]); delete[] el.pDependencies; + delete[] el.pCorrelatedViewMasks; } @@ -2778,6 +4095,54 @@ void Deserialise(const VkDeviceQueueInfo2 &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceProtectedMemoryFeatures &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_FEATURES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(protectedMemory); +} + +template <> +void Deserialise(const VkPhysicalDeviceProtectedMemoryFeatures &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceProtectedMemoryProperties &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROTECTED_MEMORY_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(protectedNoFault); +} + +template <> +void Deserialise(const VkPhysicalDeviceProtectedMemoryProperties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceShaderDrawParameterFeatures &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_DRAW_PARAMETER_FEATURES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(shaderDrawParameters); +} + +template <> +void Deserialise(const VkPhysicalDeviceShaderDrawParameterFeatures &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkExportMemoryAllocateInfoNV &el) { @@ -2823,6 +4188,96 @@ void Deserialise(const VkExternalMemoryImageCreateInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceExternalImageFormatInfo &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_IMAGE_FORMAT_INFO); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkPhysicalDeviceExternalImageFormatInfo &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkExternalMemoryProperties &el) +{ + SERIALISE_MEMBER_TYPED(VkExternalMemoryFeatureFlagBits, externalMemoryFeatures); + SERIALISE_MEMBER_TYPED(VkExternalMemoryHandleTypeFlagBits, exportFromImportedHandleTypes); + SERIALISE_MEMBER_TYPED(VkExternalMemoryHandleTypeFlagBits, compatibleHandleTypes); +} + +template +void DoSerialise(SerialiserType &ser, VkExternalImageFormatProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_EXTERNAL_IMAGE_FORMAT_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(externalMemoryProperties); +} + +template <> +void Deserialise(const VkExternalImageFormatProperties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceExternalBufferInfo &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_BUFFER_INFO); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(flags); + SERIALISE_MEMBER(usage); + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkPhysicalDeviceExternalBufferInfo &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkExternalBufferProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_EXTERNAL_BUFFER_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(externalMemoryProperties); +} + +template <> +void Deserialise(const VkExternalBufferProperties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceIDProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(deviceUUID); + SERIALISE_MEMBER(driverUUID); + SERIALISE_MEMBER(deviceLUID); + SERIALISE_MEMBER(deviceNodeMask); + SERIALISE_MEMBER(deviceLUIDValid); +} + +template <> +void Deserialise(const VkPhysicalDeviceIDProperties &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkExportMemoryAllocateInfo &el) { @@ -2860,7 +4315,7 @@ void DoSerialise(SerialiserType &ser, VkImportMemoryFdInfoKHR &el) SerialiseNext(ser, el.sType, el.pNext); SERIALISE_MEMBER(handleType); - SERIALISE_MEMBER(fd); + SERIALISE_MEMBER_TYPED(int32_t, fd); } template <> @@ -2869,6 +4324,69 @@ void Deserialise(const VkImportMemoryFdInfoKHR &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkMemoryFdPropertiesKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_FD_PROPERTIES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memoryTypeBits); +} + +template <> +void Deserialise(const VkMemoryFdPropertiesKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkMemoryGetFdInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_GET_FD_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memory); + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkMemoryGetFdInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceExternalSemaphoreInfo &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_SEMAPHORE_INFO); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkPhysicalDeviceExternalSemaphoreInfo &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkExternalSemaphoreProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_EXTERNAL_SEMAPHORE_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkExternalSemaphoreHandleTypeFlagBits, exportFromImportedHandleTypes); + SERIALISE_MEMBER_TYPED(VkExternalSemaphoreHandleTypeFlagBits, compatibleHandleTypes); + SERIALISE_MEMBER_TYPED(VkExternalSemaphoreFeatureFlagBits, externalSemaphoreFeatures); +} + +template <> +void Deserialise(const VkExternalSemaphoreProperties &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkExportSemaphoreCreateInfo &el) { @@ -2884,6 +4402,116 @@ void Deserialise(const VkExportSemaphoreCreateInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkImportSemaphoreFdInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_FD_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(semaphore); + SERIALISE_MEMBER_TYPED(VkSemaphoreImportFlagBits, flags); + SERIALISE_MEMBER_TYPED(VkExternalSemaphoreHandleTypeFlagBits, handleType); + SERIALISE_MEMBER_TYPED(int32_t, fd); +} + +template <> +void Deserialise(const VkImportSemaphoreFdInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkSemaphoreGetFdInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SEMAPHORE_GET_FD_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(semaphore); + SERIALISE_MEMBER_TYPED(VkExternalSemaphoreHandleTypeFlagBits, handleType); +} + +template <> +void Deserialise(const VkSemaphoreGetFdInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPresentInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_PRESENT_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(srcRect); + SERIALISE_MEMBER(dstRect); + SERIALISE_MEMBER(persistent); +} + +template <> +void Deserialise(const VkDisplayPresentInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkConformanceVersionKHR &el) +{ + SERIALISE_MEMBER(major); + SERIALISE_MEMBER(minor); + SERIALISE_MEMBER(subminor); + SERIALISE_MEMBER(patch); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceDriverPropertiesKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(driverID); + SERIALISE_MEMBER(driverName); + SERIALISE_MEMBER(driverInfo); + SERIALISE_MEMBER(conformanceVersion); +} + +template <> +void Deserialise(const VkPhysicalDeviceDriverPropertiesKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceExternalFenceInfo &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTERNAL_FENCE_INFO); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkPhysicalDeviceExternalFenceInfo &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkExternalFenceProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_EXTERNAL_FENCE_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER_TYPED(VkExternalFenceHandleTypeFlagBits, exportFromImportedHandleTypes); + SERIALISE_MEMBER_TYPED(VkExternalFenceHandleTypeFlagBits, compatibleHandleTypes); + SERIALISE_MEMBER_TYPED(VkExternalFenceFeatureFlagBits, externalFenceFeatures); +} + +template <> +void Deserialise(const VkExternalFenceProperties &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkExportFenceCreateInfo &el) { @@ -2899,6 +4527,84 @@ void Deserialise(const VkExportFenceCreateInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkImportFenceFdInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMPORT_FENCE_FD_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(fence); + SERIALISE_MEMBER_TYPED(VkFenceImportFlagBits, flags); + SERIALISE_MEMBER_TYPED(VkExternalFenceHandleTypeFlagBits, handleType); + SERIALISE_MEMBER_TYPED(int32_t, fd); +} + +template <> +void Deserialise(const VkImportFenceFdInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkFenceGetFdInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_FENCE_GET_FD_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkFenceGetFdInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPowerInfoEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_POWER_INFO_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(powerState); +} + +template <> +void Deserialise(const VkDisplayPowerInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDeviceEventInfoEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEVICE_EVENT_INFO_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(deviceEvent); +} + +template <> +void Deserialise(const VkDeviceEventInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayEventInfoEXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_EVENT_INFO_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(displayEvent); +} + +template <> +void Deserialise(const VkDisplayEventInfoEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkSwapchainCounterCreateInfoEXT &el) { @@ -2914,6 +4620,31 @@ void Deserialise(const VkSwapchainCounterCreateInfoEXT &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkSurfaceCapabilities2EXT &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(minImageCount); + SERIALISE_MEMBER(maxImageCount); + SERIALISE_MEMBER(currentExtent); + SERIALISE_MEMBER(minImageExtent); + SERIALISE_MEMBER(maxImageExtent); + SERIALISE_MEMBER(maxImageArrayLayers); + SERIALISE_MEMBER_TYPED(VkSurfaceTransformFlagBitsKHR, supportedTransforms); + SERIALISE_MEMBER(currentTransform); + SERIALISE_MEMBER_TYPED(VkCompositeAlphaFlagBitsKHR, supportedCompositeAlpha); + SERIALISE_MEMBER_TYPED(VkImageUsageFlagBits, supportedUsageFlags); + SERIALISE_MEMBER_TYPED(VkSurfaceCounterFlagBitsEXT, supportedSurfaceCounters); +} + +template <> +void Deserialise(const VkSurfaceCapabilities2EXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkDedicatedAllocationMemoryAllocateInfoNV &el) { @@ -2963,6 +4694,22 @@ void Deserialise(const VkDedicatedAllocationBufferCreateInfoNV &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkMemoryDedicatedRequirements &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(prefersDedicatedAllocation); + SERIALISE_MEMBER(requiresDedicatedAllocation); +} + +template <> +void Deserialise(const VkMemoryDedicatedRequirements &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkMemoryDedicatedAllocateInfo &el) { @@ -2995,6 +4742,25 @@ void Deserialise(const VkDeviceQueueGlobalPriorityCreateInfoEXT &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDevicePCIBusInfoPropertiesEXT &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PCI_BUS_INFO_PROPERTIES_EXT); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(pciDomain); + SERIALISE_MEMBER(pciBus); + SERIALISE_MEMBER(pciDevice); + SERIALISE_MEMBER(pciFunction); +} + +template <> +void Deserialise(const VkPhysicalDevicePCIBusInfoPropertiesEXT &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkBindImagePlaneMemoryInfo &el) { @@ -3010,6 +4776,70 @@ void Deserialise(const VkBindImagePlaneMemoryInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkImagePlaneMemoryRequirementsInfo &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(planeAspect); +} + +template <> +void Deserialise(const VkImagePlaneMemoryRequirementsInfo &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceSamplerYcbcrConversionFeatures &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SAMPLER_YCBCR_CONVERSION_FEATURES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(samplerYcbcrConversion); +} + +template <> +void Deserialise(const VkPhysicalDeviceSamplerYcbcrConversionFeatures &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkSamplerYcbcrConversionImageFormatProperties &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_SAMPLER_YCBCR_CONVERSION_IMAGE_FORMAT_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(combinedImageSamplerDescriptorCount); +} + +template <> +void Deserialise(const VkSamplerYcbcrConversionImageFormatProperties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceShaderAtomicInt64FeaturesKHR &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SHADER_ATOMIC_INT64_FEATURES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(shaderBufferInt64Atomics); + SERIALISE_MEMBER(shaderSharedInt64Atomics); +} + +template <> +void Deserialise(const VkPhysicalDeviceShaderAtomicInt64FeaturesKHR &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkSamplerYcbcrConversionInfo &el) { @@ -3056,6 +4886,85 @@ void Deserialise(const VkBindImageMemorySwapchainInfoKHR &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkDeviceGroupPresentCapabilitiesKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_CAPABILITIES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(presentMask); + SERIALISE_MEMBER_TYPED(VkDeviceGroupPresentModeFlagBitsKHR, modes); +} + +template <> +void Deserialise(const VkDeviceGroupPresentCapabilitiesKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDeviceGroupPresentInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_PRESENT_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(swapchainCount); + SERIALISE_MEMBER_ARRAY(pDeviceMasks, swapchainCount); + SERIALISE_MEMBER_TYPED(VkDeviceGroupPresentModeFlagBitsKHR, mode); +} + +template <> +void Deserialise(const VkDeviceGroupPresentInfoKHR &el) +{ + DeserialiseNext(el.pNext); + + delete[] el.pDeviceMasks; +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceGroupProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_GROUP_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + if(ser.IsReading()) + { + for(uint32_t i = 0; i < VK_MAX_DEVICE_GROUP_SIZE; i++) + el.physicalDevices[i] = VK_NULL_HANDLE; + } + + SERIALISE_MEMBER(physicalDeviceCount); + // manual call to Serialise to ensure we only serialise the number of devices, but also don't + // allocate memory + ser.Serialise("physicalDevices", (VkPhysicalDevice *&)el.physicalDevices, + (uint64_t)el.physicalDeviceCount, SerialiserFlags::NoFlags); + SERIALISE_MEMBER(subsetAllocation); +} + +template <> +void Deserialise(const VkPhysicalDeviceGroupProperties &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDeviceGroupDeviceCreateInfo &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DEVICE_GROUP_DEVICE_CREATE_INFO); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(physicalDeviceCount); + SERIALISE_MEMBER_ARRAY(pPhysicalDevices, physicalDeviceCount); +} + +template <> +void Deserialise(const VkDeviceGroupDeviceCreateInfo &el) +{ + DeserialiseNext(el.pNext); + + delete[] el.pPhysicalDevices; +} + template void DoSerialise(SerialiserType &ser, VkImageSwapchainCreateInfoKHR &el) { @@ -3200,6 +5109,24 @@ void Deserialise(const VkMemoryAllocateFlagsInfo &el) DeserialiseNext(el.pNext); } +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceSubgroupProperties &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(subgroupSize); + SERIALISE_MEMBER_TYPED(VkShaderStageFlagBits, supportedStages); + SERIALISE_MEMBER_TYPED(VkSubgroupFeatureFlagBits, supportedOperations); + SERIALISE_MEMBER(quadOperationsInAllStages); +} + +template <> +void Deserialise(const VkPhysicalDeviceSubgroupProperties &el) +{ + DeserialiseNext(el.pNext); +} + template void DoSerialise(SerialiserType &ser, VkProtectedSubmitInfo &el) { @@ -3215,154 +5142,659 @@ void Deserialise(const VkProtectedSubmitInfo &el) DeserialiseNext(el.pNext); } -INSTANTIATE_SERIALISE_TYPE(VkOffset2D); -INSTANTIATE_SERIALISE_TYPE(VkExtent2D); -INSTANTIATE_SERIALISE_TYPE(VkMemoryType); -INSTANTIATE_SERIALISE_TYPE(VkMemoryHeap); -INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceLimits); -INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSparseProperties); -INSTANTIATE_SERIALISE_TYPE(VkQueueFamilyProperties); -INSTANTIATE_SERIALISE_TYPE(VkExtent3D); -INSTANTIATE_SERIALISE_TYPE(VkPipelineShaderStageCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkOffset3D); -INSTANTIATE_SERIALISE_TYPE(VkCommandBufferInheritanceInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineVertexInputStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkSparseBufferMemoryBindInfo); -INSTANTIATE_SERIALISE_TYPE(VkSparseImageOpaqueMemoryBindInfo); -INSTANTIATE_SERIALISE_TYPE(VkSparseImageMemoryBindInfo); -INSTANTIATE_SERIALISE_TYPE(VkAttachmentDescription); -INSTANTIATE_SERIALISE_TYPE(VkSubpassDescription); -INSTANTIATE_SERIALISE_TYPE(VkSubpassDependency); -INSTANTIATE_SERIALISE_TYPE(VkClearValue); -INSTANTIATE_SERIALISE_TYPE(VkClearColorValue); -INSTANTIATE_SERIALISE_TYPE(VkClearDepthStencilValue); -INSTANTIATE_SERIALISE_TYPE(VkClearAttachment); -INSTANTIATE_SERIALISE_TYPE(VkClearRect); -INSTANTIATE_SERIALISE_TYPE(VkViewport); -INSTANTIATE_SERIALISE_TYPE(VkPipelineColorBlendAttachmentState); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorPoolSize); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorImageInfo); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorBufferInfo); -INSTANTIATE_SERIALISE_TYPE(VkSpecializationInfo); -INSTANTIATE_SERIALISE_TYPE(VkAttachmentReference); -INSTANTIATE_SERIALISE_TYPE(VkSparseImageMemoryBind); -INSTANTIATE_SERIALISE_TYPE(VkVertexInputBindingDescription); -INSTANTIATE_SERIALISE_TYPE(VkVertexInputAttributeDescription); -INSTANTIATE_SERIALISE_TYPE(VkSpecializationMapEntry); -INSTANTIATE_SERIALISE_TYPE(VkRect2D); -INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkAllocationCallbacks); -INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceFeatures); -INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMemoryProperties); -INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceProperties); -INSTANTIATE_SERIALISE_TYPE(VkDeviceCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkBufferCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkBufferViewCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkImageCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkImageViewCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkMemoryRequirements); -INSTANTIATE_SERIALISE_TYPE(VkSparseMemoryBind); +template +void DoSerialise(SerialiserType &ser, VkDisplayPlaneInfo2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_PLANE_INFO_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + // don't serialise unwrapped VkDisplayModeKHR + // SERIALISE_MEMBER(mode); + SERIALISE_MEMBER(planeIndex); +} + +template <> +void Deserialise(const VkDisplayPlaneInfo2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPlaneCapabilitiesKHR &el) +{ + SERIALISE_MEMBER_TYPED(VkDisplayPlaneAlphaFlagBitsKHR, supportedAlpha); + SERIALISE_MEMBER(minSrcPosition); + SERIALISE_MEMBER(maxSrcPosition); + SERIALISE_MEMBER(minSrcExtent); + SERIALISE_MEMBER(maxSrcExtent); + SERIALISE_MEMBER(minDstPosition); + SERIALISE_MEMBER(maxDstPosition); + SERIALISE_MEMBER(minDstExtent); + SERIALISE_MEMBER(maxDstExtent); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPlaneCapabilities2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_PLANE_CAPABILITIES_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(capabilities); +} + +template <> +void Deserialise(const VkDisplayPlaneCapabilities2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPropertiesKHR &el) +{ + // don't serialise unwrapped VkDisplayKHR + // SERIALISE_MEMBER(display); + SERIALISE_MEMBER(displayName); + SERIALISE_MEMBER(physicalDimensions); + SERIALISE_MEMBER(physicalResolution); + SERIALISE_MEMBER_TYPED(VkSurfaceTransformFlagBitsKHR, supportedTransforms); + SERIALISE_MEMBER(planeReorderPossible); + SERIALISE_MEMBER(persistentContent); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayProperties2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_PROPERTIES_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(displayProperties); +} + +template <> +void Deserialise(const VkDisplayProperties2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPlanePropertiesKHR &el) +{ + // don't serialise unwrapped VkDisplayKHR + // SERIALISE_MEMBER(currentDisplay); + SERIALISE_MEMBER(currentStackIndex); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayPlaneProperties2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_PLANE_PROPERTIES_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(displayPlaneProperties); +} + +template <> +void Deserialise(const VkDisplayPlaneProperties2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayModeParametersKHR &el) +{ + SERIALISE_MEMBER(visibleRegion); + SERIALISE_MEMBER(refreshRate); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayModePropertiesKHR &el) +{ + // don't serialise unwrapped VkDisplayModeKHR + // SERIALISE_MEMBER(displayMode); + SERIALISE_MEMBER(parameters); +} + +template +void DoSerialise(SerialiserType &ser, VkDisplayModeProperties2KHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_DISPLAY_MODE_PROPERTIES_2_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(displayModeProperties); +} + +template <> +void Deserialise(const VkDisplayModeProperties2KHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkBufferMemoryRequirementsInfo2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_BUFFER_MEMORY_REQUIREMENTS_INFO_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(buffer); +} + +template <> +void Deserialise(const VkBufferMemoryRequirementsInfo2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkImageMemoryRequirementsInfo2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMAGE_MEMORY_REQUIREMENTS_INFO_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(image); +} + +template <> +void Deserialise(const VkImageMemoryRequirementsInfo2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkImageSparseMemoryRequirementsInfo2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMAGE_SPARSE_MEMORY_REQUIREMENTS_INFO_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(image); +} + +template <> +void Deserialise(const VkImageSparseMemoryRequirementsInfo2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkMemoryRequirements2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_REQUIREMENTS_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memoryRequirements); +} + +template <> +void Deserialise(const VkMemoryRequirements2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkSparseImageMemoryRequirements &el) +{ + SERIALISE_MEMBER(formatProperties); + SERIALISE_MEMBER(imageMipTailFirstLod); + SERIALISE_MEMBER(imageMipTailSize); + SERIALISE_MEMBER(imageMipTailOffset); + SERIALISE_MEMBER(imageMipTailStride); +} + +template +void DoSerialise(SerialiserType &ser, VkSparseImageMemoryRequirements2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SPARSE_IMAGE_MEMORY_REQUIREMENTS_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memoryRequirements); +} + +template <> +void Deserialise(const VkSparseImageMemoryRequirements2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceFeatures2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(features); +} + +template <> +void Deserialise(const VkPhysicalDeviceFeatures2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceProperties2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(properties); +} + +template <> +void Deserialise(const VkPhysicalDeviceProperties2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkFormatProperties &el) +{ + SERIALISE_MEMBER_TYPED(VkFormatFeatureFlagBits, linearTilingFeatures); + SERIALISE_MEMBER_TYPED(VkFormatFeatureFlagBits, optimalTilingFeatures); + SERIALISE_MEMBER_TYPED(VkFormatFeatureFlagBits, bufferFeatures); +} + +template +void DoSerialise(SerialiserType &ser, VkFormatProperties2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(formatProperties); +} + +template <> +void Deserialise(const VkFormatProperties2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkImageFormatProperties &el) +{ + SERIALISE_MEMBER(maxExtent); + SERIALISE_MEMBER(maxMipLevels); + SERIALISE_MEMBER(maxArrayLayers); + SERIALISE_MEMBER_TYPED(VkSampleCountFlagBits, sampleCounts); + SERIALISE_MEMBER(maxResourceSize); +} + +template +void DoSerialise(SerialiserType &ser, VkImageFormatProperties2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMAGE_FORMAT_PROPERTIES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(imageFormatProperties); +} + +template <> +void Deserialise(const VkImageFormatProperties2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceImageFormatInfo2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(format); + SERIALISE_MEMBER(type); + SERIALISE_MEMBER(tiling); + SERIALISE_MEMBER(usage); + SERIALISE_MEMBER(flags); +} + +template <> +void Deserialise(const VkPhysicalDeviceImageFormatInfo2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkQueueFamilyProperties2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_QUEUE_FAMILY_PROPERTIES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(queueFamilyProperties); +} + +template <> +void Deserialise(const VkQueueFamilyProperties2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceMemoryProperties2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_PROPERTIES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memoryProperties); +} + +template <> +void Deserialise(const VkPhysicalDeviceMemoryProperties2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkSparseImageFormatProperties &el) +{ + SERIALISE_MEMBER_TYPED(VkImageAspectFlagBits, aspectMask); + SERIALISE_MEMBER(imageGranularity); + SERIALISE_MEMBER_TYPED(VkSparseImageFormatFlagBits, flags); +} + +template +void DoSerialise(SerialiserType &ser, VkSparseImageFormatProperties2 &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SPARSE_IMAGE_FORMAT_PROPERTIES_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(properties); +} + +template <> +void Deserialise(const VkSparseImageFormatProperties2 &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkPhysicalDeviceSparseImageFormatInfo2 &el) +{ + RDCASSERT(ser.IsReading() || + el.sType == VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SPARSE_IMAGE_FORMAT_INFO_2); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(format); + SERIALISE_MEMBER(type); + SERIALISE_MEMBER(samples); + SERIALISE_MEMBER(usage); + SERIALISE_MEMBER(tiling); +} + +template <> +void Deserialise(const VkPhysicalDeviceSparseImageFormatInfo2 &el) +{ + DeserialiseNext(el.pNext); +} + +// pNext structs - always have deserialise for the next chain +INSTANTIATE_SERIALISE_TYPE(VkAcquireNextImageInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkApplicationInfo); +INSTANTIATE_SERIALISE_TYPE(VkAttachmentDescription2KHR); +INSTANTIATE_SERIALISE_TYPE(VkAttachmentReference2KHR); +INSTANTIATE_SERIALISE_TYPE(VkBindBufferMemoryDeviceGroupInfo); +INSTANTIATE_SERIALISE_TYPE(VkBindBufferMemoryInfo); +INSTANTIATE_SERIALISE_TYPE(VkBindImageMemoryDeviceGroupInfo); +INSTANTIATE_SERIALISE_TYPE(VkBindImageMemoryInfo); +INSTANTIATE_SERIALISE_TYPE(VkBindImageMemorySwapchainInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkBindImagePlaneMemoryInfo); INSTANTIATE_SERIALISE_TYPE(VkBindSparseInfo); -INSTANTIATE_SERIALISE_TYPE(VkSubmitInfo); -INSTANTIATE_SERIALISE_TYPE(VkFramebufferCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkRenderPassCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkRenderPassBeginInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineInputAssemblyStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineTessellationStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineViewportStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineMultisampleStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineDepthStencilStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineColorBlendStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineDynamicStateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineLayoutCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPushConstantRange); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetLayoutBinding); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetLayoutCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorPoolCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetAllocateInfo); -INSTANTIATE_SERIALISE_TYPE(VkWriteDescriptorSet); -INSTANTIATE_SERIALISE_TYPE(VkCopyDescriptorSet); -INSTANTIATE_SERIALISE_TYPE(VkCommandPoolCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkBufferCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkBufferMemoryBarrier); +INSTANTIATE_SERIALISE_TYPE(VkBufferMemoryRequirementsInfo2); +INSTANTIATE_SERIALISE_TYPE(VkBufferViewCreateInfo); INSTANTIATE_SERIALISE_TYPE(VkCommandBufferAllocateInfo); INSTANTIATE_SERIALISE_TYPE(VkCommandBufferBeginInfo); -INSTANTIATE_SERIALISE_TYPE(VkStencilOpState); -INSTANTIATE_SERIALISE_TYPE(VkQueryPoolCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkSemaphoreCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkCommandBufferInheritanceInfo); +INSTANTIATE_SERIALISE_TYPE(VkCommandPoolCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkComputePipelineCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkCopyDescriptorSet); +INSTANTIATE_SERIALISE_TYPE(VkDebugMarkerMarkerInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugMarkerObjectNameInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugMarkerObjectTagInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugReportCallbackCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugUtilsLabelEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugUtilsMessengerCallbackDataEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugUtilsMessengerCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugUtilsObjectNameInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDebugUtilsObjectTagInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDedicatedAllocationBufferCreateInfoNV); +INSTANTIATE_SERIALISE_TYPE(VkDedicatedAllocationImageCreateInfoNV); +INSTANTIATE_SERIALISE_TYPE(VkDedicatedAllocationMemoryAllocateInfoNV); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorPoolCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetAllocateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetLayoutCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetLayoutSupport); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorUpdateTemplateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceEventInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupBindSparseInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupCommandBufferBeginInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupDeviceCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupPresentCapabilitiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupPresentInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupSubmitInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueGlobalPriorityCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueInfo2); +INSTANTIATE_SERIALISE_TYPE(VkDisplayEventInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDisplayModeProperties2KHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPlaneCapabilities2KHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPlaneInfo2KHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPlaneProperties2KHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPowerInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPresentInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayProperties2KHR); INSTANTIATE_SERIALISE_TYPE(VkEventCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkExportFenceCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkExportMemoryAllocateInfo); +INSTANTIATE_SERIALISE_TYPE(VkExportMemoryAllocateInfoNV); +INSTANTIATE_SERIALISE_TYPE(VkExportSemaphoreCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkExternalBufferProperties); +INSTANTIATE_SERIALISE_TYPE(VkExternalFenceProperties); +INSTANTIATE_SERIALISE_TYPE(VkExternalImageFormatProperties); +INSTANTIATE_SERIALISE_TYPE(VkExternalMemoryBufferCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkExternalMemoryImageCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkExternalMemoryImageCreateInfoNV); +INSTANTIATE_SERIALISE_TYPE(VkExternalSemaphoreProperties); INSTANTIATE_SERIALISE_TYPE(VkFenceCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkSamplerCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineCacheCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkShaderModuleCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkImageSubresourceRange); -INSTANTIATE_SERIALISE_TYPE(VkImageSubresource); -INSTANTIATE_SERIALISE_TYPE(VkImageSubresourceLayers); +INSTANTIATE_SERIALISE_TYPE(VkFenceGetFdInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkFormatProperties2); +INSTANTIATE_SERIALISE_TYPE(VkFramebufferCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkGraphicsPipelineCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkImageCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkImageFormatListCreateInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkImageFormatProperties2); +INSTANTIATE_SERIALISE_TYPE(VkImageMemoryBarrier); +INSTANTIATE_SERIALISE_TYPE(VkImageMemoryRequirementsInfo2); +INSTANTIATE_SERIALISE_TYPE(VkImagePlaneMemoryRequirementsInfo); +INSTANTIATE_SERIALISE_TYPE(VkImageSparseMemoryRequirementsInfo2); +INSTANTIATE_SERIALISE_TYPE(VkImageSwapchainCreateInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkImageViewASTCDecodeModeEXT); +INSTANTIATE_SERIALISE_TYPE(VkImageViewCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkImageViewUsageCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkImportFenceFdInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkImportMemoryFdInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkImportSemaphoreFdInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkInstanceCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkLayerDeviceCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkLayerInstanceCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkMappedMemoryRange); +INSTANTIATE_SERIALISE_TYPE(VkMemoryAllocateFlagsInfo); INSTANTIATE_SERIALISE_TYPE(VkMemoryAllocateInfo); INSTANTIATE_SERIALISE_TYPE(VkMemoryBarrier); -INSTANTIATE_SERIALISE_TYPE(VkBufferMemoryBarrier); -INSTANTIATE_SERIALISE_TYPE(VkImageMemoryBarrier); -INSTANTIATE_SERIALISE_TYPE(VkGraphicsPipelineCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkComputePipelineCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkComponentMapping); -INSTANTIATE_SERIALISE_TYPE(VkMappedMemoryRange); -INSTANTIATE_SERIALISE_TYPE(VkBufferImageCopy); -INSTANTIATE_SERIALISE_TYPE(VkBufferCopy); -INSTANTIATE_SERIALISE_TYPE(VkImageCopy); -INSTANTIATE_SERIALISE_TYPE(VkImageBlit); -INSTANTIATE_SERIALISE_TYPE(VkImageResolve); -INSTANTIATE_SERIALISE_TYPE(VkSwapchainCreateInfoKHR); -INSTANTIATE_SERIALISE_TYPE(VkDebugMarkerMarkerInfoEXT); -INSTANTIATE_SERIALISE_TYPE(VkDescriptorUpdateTemplateCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkBindBufferMemoryInfo); -INSTANTIATE_SERIALISE_TYPE(VkBindImageMemoryInfo); -INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationConservativeStateCreateInfoEXT); -INSTANTIATE_SERIALISE_TYPE(VkPipelineVertexInputDivisorStateCreateInfoEXT); -INSTANTIATE_SERIALISE_TYPE(VkSamplerReductionModeCreateInfoEXT); -INSTANTIATE_SERIALISE_TYPE(VkDebugUtilsLabelEXT); -INSTANTIATE_SERIALISE_TYPE(VkSamplerYcbcrConversionCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkRenderPassMultiviewCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueInfo2); -INSTANTIATE_SERIALISE_TYPE(VkExportMemoryAllocateInfoNV); -INSTANTIATE_SERIALISE_TYPE(VkExternalMemoryImageCreateInfoNV); -INSTANTIATE_SERIALISE_TYPE(VkExportMemoryAllocateInfo); -INSTANTIATE_SERIALISE_TYPE(VkExternalMemoryBufferCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkImportMemoryFdInfoKHR); -INSTANTIATE_SERIALISE_TYPE(VkExportSemaphoreCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkExportFenceCreateInfo); -INSTANTIATE_SERIALISE_TYPE(VkSwapchainCounterCreateInfoEXT); -INSTANTIATE_SERIALISE_TYPE(VkDedicatedAllocationMemoryAllocateInfoNV); -INSTANTIATE_SERIALISE_TYPE(VkDedicatedAllocationImageCreateInfoNV); -INSTANTIATE_SERIALISE_TYPE(VkDedicatedAllocationBufferCreateInfoNV); INSTANTIATE_SERIALISE_TYPE(VkMemoryDedicatedAllocateInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceQueueGlobalPriorityCreateInfoEXT); -INSTANTIATE_SERIALISE_TYPE(VkBindImagePlaneMemoryInfo); -INSTANTIATE_SERIALISE_TYPE(VkSamplerYcbcrConversionInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupSwapchainCreateInfoKHR); -INSTANTIATE_SERIALISE_TYPE(VkBindImageMemorySwapchainInfoKHR); -INSTANTIATE_SERIALISE_TYPE(VkImageSwapchainCreateInfoKHR); -INSTANTIATE_SERIALISE_TYPE(VkBindImageMemoryDeviceGroupInfo); -INSTANTIATE_SERIALISE_TYPE(VkBindBufferMemoryDeviceGroupInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupBindSparseInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupSubmitInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupCommandBufferBeginInfo); -INSTANTIATE_SERIALISE_TYPE(VkDeviceGroupRenderPassBeginInfo); -INSTANTIATE_SERIALISE_TYPE(VkMemoryAllocateFlagsInfo); +INSTANTIATE_SERIALISE_TYPE(VkMemoryDedicatedRequirements); +INSTANTIATE_SERIALISE_TYPE(VkMemoryFdPropertiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkMemoryGetFdInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkMemoryRequirements2); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevice16BitStorageFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevice8BitStorageFeaturesKHR); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceASTCDecodeFeaturesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceConservativeRasterizationPropertiesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceDriverPropertiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceExternalBufferInfo); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceExternalFenceInfo); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceExternalImageFormatInfo); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceExternalSemaphoreInfo); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceFeatures2); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceGroupProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceIDProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceImageFormatInfo2); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMaintenance3Properties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMemoryProperties2); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMultiviewFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMultiviewProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePCIBusInfoPropertiesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePointClippingProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceProperties2); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceProtectedMemoryFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceProtectedMemoryProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDevicePushDescriptorPropertiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSamplerFilterMinmaxPropertiesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSamplerYcbcrConversionFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceShaderAtomicInt64FeaturesKHR); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceShaderCorePropertiesAMD); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceShaderDrawParameterFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSparseImageFormatInfo2); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSubgroupProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSurfaceInfo2KHR); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceTransformFeedbackFeaturesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceTransformFeedbackPropertiesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceVariablePointerFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceVulkanMemoryModelFeaturesKHR); +INSTANTIATE_SERIALISE_TYPE(VkPipelineCacheCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineColorBlendStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineDepthStencilStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineDynamicStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineInputAssemblyStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineLayoutCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineMultisampleStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationConservativeStateCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineRasterizationStateStreamCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkPipelineShaderStageCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineTessellationDomainOriginStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineTessellationStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineVertexInputDivisorStateCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkPipelineVertexInputStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPipelineViewportStateCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkPresentInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkPresentRegionsKHR); INSTANTIATE_SERIALISE_TYPE(VkProtectedSubmitInfo); -INSTANTIATE_SERIALISE_TYPE(VkImageFormatListCreateInfoKHR); -INSTANTIATE_SERIALISE_TYPE(VkImageViewASTCDecodeModeEXT); -INSTANTIATE_SERIALISE_TYPE(VkShaderModuleValidationCacheCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkQueryPoolCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkQueueFamilyProperties2); +INSTANTIATE_SERIALISE_TYPE(VkRenderPassBeginInfo); +INSTANTIATE_SERIALISE_TYPE(VkRenderPassCreateInfo); INSTANTIATE_SERIALISE_TYPE(VkRenderPassCreateInfo2KHR); +INSTANTIATE_SERIALISE_TYPE(VkRenderPassInputAttachmentAspectCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkRenderPassMultiviewCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkSamplerCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkSamplerReductionModeCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkSamplerYcbcrConversionCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkSamplerYcbcrConversionImageFormatProperties); +INSTANTIATE_SERIALISE_TYPE(VkSamplerYcbcrConversionInfo); +INSTANTIATE_SERIALISE_TYPE(VkSemaphoreCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkSemaphoreGetFdInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkShaderModuleCreateInfo); +INSTANTIATE_SERIALISE_TYPE(VkShaderModuleValidationCacheCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkSharedPresentSurfaceCapabilitiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageFormatProperties2); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageMemoryRequirements2); +INSTANTIATE_SERIALISE_TYPE(VkSubmitInfo); INSTANTIATE_SERIALISE_TYPE(VkSubpassBeginInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkSubpassDependency2KHR); +INSTANTIATE_SERIALISE_TYPE(VkSubpassDescription2KHR); INSTANTIATE_SERIALISE_TYPE(VkSubpassEndInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkSurfaceCapabilities2EXT); +INSTANTIATE_SERIALISE_TYPE(VkSurfaceCapabilities2KHR); +INSTANTIATE_SERIALISE_TYPE(VkSurfaceFormat2KHR); +INSTANTIATE_SERIALISE_TYPE(VkSwapchainCounterCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkSwapchainCreateInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkTextureLODGatherFormatPropertiesAMD); +INSTANTIATE_SERIALISE_TYPE(VkValidationCacheCreateInfoEXT); +INSTANTIATE_SERIALISE_TYPE(VkValidationFlagsEXT); +INSTANTIATE_SERIALISE_TYPE(VkWriteDescriptorSet); + +// plain structs with no next chain +INSTANTIATE_SERIALISE_TYPE(VkAllocationCallbacks); +INSTANTIATE_SERIALISE_TYPE(VkAttachmentDescription); +INSTANTIATE_SERIALISE_TYPE(VkAttachmentReference); +INSTANTIATE_SERIALISE_TYPE(VkBufferCopy); +INSTANTIATE_SERIALISE_TYPE(VkBufferImageCopy); +INSTANTIATE_SERIALISE_TYPE(VkClearAttachment); +INSTANTIATE_SERIALISE_TYPE(VkClearColorValue); +INSTANTIATE_SERIALISE_TYPE(VkClearDepthStencilValue); +INSTANTIATE_SERIALISE_TYPE(VkClearRect); +INSTANTIATE_SERIALISE_TYPE(VkClearValue); +INSTANTIATE_SERIALISE_TYPE(VkComponentMapping); +INSTANTIATE_SERIALISE_TYPE(VkConformanceVersionKHR); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorBufferInfo); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorImageInfo); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorPoolSize); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorSetLayoutBinding); +INSTANTIATE_SERIALISE_TYPE(VkDescriptorUpdateTemplateEntry); INSTANTIATE_SERIALISE_TYPE(VkDispatchIndirectCommand); -INSTANTIATE_SERIALISE_TYPE(VkDrawIndirectCommand); +INSTANTIATE_SERIALISE_TYPE(VkDisplayModeParametersKHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayModePropertiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPlaneCapabilitiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPlanePropertiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkDisplayPropertiesKHR); INSTANTIATE_SERIALISE_TYPE(VkDrawIndexedIndirectCommand); +INSTANTIATE_SERIALISE_TYPE(VkDrawIndirectCommand); +INSTANTIATE_SERIALISE_TYPE(VkExtent2D); +INSTANTIATE_SERIALISE_TYPE(VkExtent3D); +INSTANTIATE_SERIALISE_TYPE(VkExternalMemoryProperties); +INSTANTIATE_SERIALISE_TYPE(VkFormatProperties); +INSTANTIATE_SERIALISE_TYPE(VkImageBlit); +INSTANTIATE_SERIALISE_TYPE(VkImageCopy); +INSTANTIATE_SERIALISE_TYPE(VkImageFormatProperties); +INSTANTIATE_SERIALISE_TYPE(VkImageResolve); +INSTANTIATE_SERIALISE_TYPE(VkImageSubresource); +INSTANTIATE_SERIALISE_TYPE(VkImageSubresourceLayers); +INSTANTIATE_SERIALISE_TYPE(VkImageSubresourceRange); +INSTANTIATE_SERIALISE_TYPE(VkInputAttachmentAspectReference); +INSTANTIATE_SERIALISE_TYPE(VkMemoryHeap); +INSTANTIATE_SERIALISE_TYPE(VkMemoryRequirements); +INSTANTIATE_SERIALISE_TYPE(VkMemoryType); +INSTANTIATE_SERIALISE_TYPE(VkOffset2D); +INSTANTIATE_SERIALISE_TYPE(VkOffset3D); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceFeatures); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceLimits); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceMemoryProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceProperties); +INSTANTIATE_SERIALISE_TYPE(VkPhysicalDeviceSparseProperties); +INSTANTIATE_SERIALISE_TYPE(VkPipelineColorBlendAttachmentState); +INSTANTIATE_SERIALISE_TYPE(VkPresentRegionKHR); +INSTANTIATE_SERIALISE_TYPE(VkPushConstantRange); +INSTANTIATE_SERIALISE_TYPE(VkQueueFamilyProperties); +INSTANTIATE_SERIALISE_TYPE(VkRect2D); +INSTANTIATE_SERIALISE_TYPE(VkRectLayerKHR); +INSTANTIATE_SERIALISE_TYPE(VkSparseBufferMemoryBindInfo); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageFormatProperties); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageMemoryBind); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageMemoryBindInfo); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageMemoryRequirements); +INSTANTIATE_SERIALISE_TYPE(VkSparseImageOpaqueMemoryBindInfo); +INSTANTIATE_SERIALISE_TYPE(VkSparseMemoryBind); +INSTANTIATE_SERIALISE_TYPE(VkSpecializationInfo); +INSTANTIATE_SERIALISE_TYPE(VkSpecializationMapEntry); +INSTANTIATE_SERIALISE_TYPE(VkStencilOpState); +INSTANTIATE_SERIALISE_TYPE(VkSubpassDependency); +INSTANTIATE_SERIALISE_TYPE(VkSubpassDescription); +INSTANTIATE_SERIALISE_TYPE(VkSurfaceCapabilitiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkSurfaceFormatKHR); +INSTANTIATE_SERIALISE_TYPE(VkVertexInputAttributeDescription); +INSTANTIATE_SERIALISE_TYPE(VkVertexInputBindingDescription); +INSTANTIATE_SERIALISE_TYPE(VkVertexInputBindingDivisorDescriptionEXT); +INSTANTIATE_SERIALISE_TYPE(VkViewport); INSTANTIATE_SERIALISE_TYPE(DescriptorSetSlot); INSTANTIATE_SERIALISE_TYPE(ImageRegionState); INSTANTIATE_SERIALISE_TYPE(ImageLayouts); -#if defined(VK_KHR_external_memory_win32) || defined(VK_NV_external_memory_win32) +#if ENABLED(RDOC_WIN32) template void DoSerialise(SerialiserType &ser, VkImportMemoryWin32HandleInfoNV &el) { @@ -3449,12 +5881,75 @@ void Deserialise(const VkImportMemoryWin32HandleInfoKHR &el) DeserialiseNext(el.pNext); } -INSTANTIATE_SERIALISE_TYPE(VkImportMemoryWin32HandleInfoNV); -INSTANTIATE_SERIALISE_TYPE(VkExportMemoryWin32HandleInfoNV); -INSTANTIATE_SERIALISE_TYPE(VkImportMemoryWin32HandleInfoKHR); -#endif // #if defined(VK_KHR_external_memory_win32) || defined(VK_NV_external_memory_win32) +template +void DoSerialise(SerialiserType &ser, VkExportMemoryWin32HandleInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + { + // serialise pointer as plain integer, rather than recursing and serialising struct + uint64_t pAttributes = (uint64_t)el.pAttributes; + ser.Serialise("pAttributes", pAttributes).TypedAs("SECURITY_ATTRIBUTES*"); + + // won't be valid on read, though we won't try to replay this anyway + if(ser.IsReading()) + el.pAttributes = NULL; + } + + SERIALISE_MEMBER_TYPED(uint32_t, dwAccess); + + { + std::string name; + + if(ser.IsWriting()) + name = el.name ? StringFormat::Wide2UTF8(std::wstring(el.name)) : ""; + + ser.Serialise("name", name); + + // we don't expose UTF82Wide on all platforms, but as above this struct won't be valid anyway + if(ser.IsReading()) + el.name = NULL; + } +} + +template <> +void Deserialise(const VkExportMemoryWin32HandleInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkMemoryWin32HandlePropertiesKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memoryTypeBits); +} + +template <> +void Deserialise(const VkMemoryWin32HandlePropertiesKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkMemoryGetWin32HandleInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(memory); + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkMemoryGetWin32HandleInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} -#ifdef VK_KHR_external_fence_win32 template void DoSerialise(SerialiserType &ser, VkExportFenceWin32HandleInfoKHR &el) { @@ -3493,10 +5988,61 @@ void Deserialise(const VkExportFenceWin32HandleInfoKHR &el) DeserialiseNext(el.pNext); } -INSTANTIATE_SERIALISE_TYPE(VkExportFenceWin32HandleInfoKHR); -#endif // #ifdef VK_KHR_external_fence_win32 +template +void DoSerialise(SerialiserType &ser, VkImportFenceWin32HandleInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(fence); + SERIALISE_MEMBER_TYPED(VkFenceImportFlagBits, flags); + SERIALISE_MEMBER(handleType); + + { + uint64_t handle = (uint64_t)el.handle; + ser.Serialise("handle", handle); + + // won't be valid on read, though we won't try to replay this anyway + if(ser.IsReading()) + el.handle = NULL; + } + + { + std::string name; + + if(ser.IsWriting()) + name = el.name ? StringFormat::Wide2UTF8(std::wstring(el.name)) : ""; + + ser.Serialise("name", name); + + // we don't expose UTF82Wide on all platforms, but as above this struct won't be valid anyway + if(ser.IsReading()) + el.name = L"???"; + } +} + +template <> +void Deserialise(const VkImportFenceWin32HandleInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkFenceGetWin32HandleInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(fence); + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkFenceGetWin32HandleInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} -#ifdef VK_KHR_external_semaphore_win32 template void DoSerialise(SerialiserType &ser, VkExportSemaphoreWin32HandleInfoKHR &el) { @@ -3535,10 +6081,81 @@ void Deserialise(const VkExportSemaphoreWin32HandleInfoKHR &el) DeserialiseNext(el.pNext); } -INSTANTIATE_SERIALISE_TYPE(VkExportSemaphoreWin32HandleInfoKHR); -#endif // #ifdef VK_KHR_external_semaphore_win32 +template +void DoSerialise(SerialiserType &ser, VkImportSemaphoreWin32HandleInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(semaphore); + SERIALISE_MEMBER_TYPED(VkSemaphoreImportFlagBits, flags); + SERIALISE_MEMBER(handleType); + + { + uint64_t handle = (uint64_t)el.handle; + ser.Serialise("handle", handle); + + // won't be valid on read, though we won't try to replay this anyway + if(ser.IsReading()) + el.handle = NULL; + } + + { + std::string name; + + if(ser.IsWriting()) + name = el.name ? StringFormat::Wide2UTF8(std::wstring(el.name)) : ""; + + ser.Serialise("name", name); + + // we don't expose UTF82Wide on all platforms, but as above this struct won't be valid anyway + if(ser.IsReading()) + el.name = L"???"; + } +} + +template <> +void Deserialise(const VkImportSemaphoreWin32HandleInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} + +template +void DoSerialise(SerialiserType &ser, VkD3D12FenceSubmitInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(waitSemaphoreValuesCount); + SERIALISE_MEMBER_ARRAY(pWaitSemaphoreValues, waitSemaphoreValuesCount); + SERIALISE_MEMBER(signalSemaphoreValuesCount); + SERIALISE_MEMBER_ARRAY(pSignalSemaphoreValues, signalSemaphoreValuesCount); +} + +template <> +void Deserialise(const VkD3D12FenceSubmitInfoKHR &el) +{ + DeserialiseNext(el.pNext); + delete[] el.pWaitSemaphoreValues; + delete[] el.pSignalSemaphoreValues; +} + +template +void DoSerialise(SerialiserType &ser, VkSemaphoreGetWin32HandleInfoKHR &el) +{ + RDCASSERT(ser.IsReading() || el.sType == VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR); + SerialiseNext(ser, el.sType, el.pNext); + + SERIALISE_MEMBER(semaphore); + SERIALISE_MEMBER(handleType); +} + +template <> +void Deserialise(const VkSemaphoreGetWin32HandleInfoKHR &el) +{ + DeserialiseNext(el.pNext); +} -#if defined(VK_KHR_win32_keyed_mutex) || defined(VK_NV_win32_keyed_mutex) template void DoSerialise(SerialiserType &ser, VkWin32KeyedMutexAcquireReleaseInfoNV &el) { @@ -3595,6 +6212,19 @@ void Deserialise(const VkWin32KeyedMutexAcquireReleaseInfoKHR &el) delete[] el.pReleaseKeys; } +INSTANTIATE_SERIALISE_TYPE(VkImportMemoryWin32HandleInfoNV); +INSTANTIATE_SERIALISE_TYPE(VkExportMemoryWin32HandleInfoNV); INSTANTIATE_SERIALISE_TYPE(VkWin32KeyedMutexAcquireReleaseInfoNV); INSTANTIATE_SERIALISE_TYPE(VkWin32KeyedMutexAcquireReleaseInfoKHR); -#endif // #if defined(VK_KHR_win32_keyed_mutex) || defined(VK_NV_win32_keyed_mutex) \ No newline at end of file +INSTANTIATE_SERIALISE_TYPE(VkImportMemoryWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkExportMemoryWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkMemoryWin32HandlePropertiesKHR); +INSTANTIATE_SERIALISE_TYPE(VkMemoryGetWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkExportSemaphoreWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkImportSemaphoreWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkD3D12FenceSubmitInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkSemaphoreGetWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkExportFenceWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkImportFenceWin32HandleInfoKHR); +INSTANTIATE_SERIALISE_TYPE(VkFenceGetWin32HandleInfoKHR); +#endif \ No newline at end of file diff --git a/renderdoc/driver/vulkan/vk_stringise.cpp b/renderdoc/driver/vulkan/vk_stringise.cpp index 70db30d5e..44aa9a2e2 100644 --- a/renderdoc/driver/vulkan/vk_stringise.cpp +++ b/renderdoc/driver/vulkan/vk_stringise.cpp @@ -711,6 +711,45 @@ std::string DoStringise(const VkDeviceGroupPresentModeFlagBitsKHR &el) END_BITFIELD_STRINGISE(); } +template <> +std::string DoStringise(const VkDebugReportFlagBitsEXT &el) +{ + BEGIN_BITFIELD_STRINGISE(VkDebugReportFlagBitsEXT); + { + STRINGISE_BITFIELD_BIT(VK_DEBUG_REPORT_INFORMATION_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_REPORT_WARNING_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_REPORT_ERROR_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_REPORT_DEBUG_BIT_EXT); + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkDebugUtilsMessageSeverityFlagBitsEXT &el) +{ + BEGIN_BITFIELD_STRINGISE(VkDebugUtilsMessageSeverityFlagBitsEXT); + { + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT); + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkDebugUtilsMessageTypeFlagBitsEXT &el) +{ + BEGIN_BITFIELD_STRINGISE(VkDebugUtilsMessageTypeFlagBitsEXT); + { + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_TYPE_GENERAL_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_TYPE_VALIDATION_BIT_EXT); + STRINGISE_BITFIELD_BIT(VK_DEBUG_UTILS_MESSAGE_TYPE_PERFORMANCE_BIT_EXT); + } + END_BITFIELD_STRINGISE(); +} + template <> std::string DoStringise(const VkMemoryAllocateFlagBits &el) { @@ -1823,50 +1862,32 @@ std::string DoStringise(const VkResult &el) template <> std::string DoStringise(const VkSurfaceTransformFlagBitsKHR &el) { - string ret; - if(el & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR"; - if(el & VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR) - ret += " | VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR"; - - if(!ret.empty()) - ret = ret.substr(3); - - return ret; + BEGIN_BITFIELD_STRINGISE(VkSurfaceTransformFlagBitsKHR); + { + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_ROTATE_90_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_ROTATE_180_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_ROTATE_270_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_90_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_180_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_HORIZONTAL_MIRROR_ROTATE_270_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_SURFACE_TRANSFORM_INHERIT_BIT_KHR); + } + END_BITFIELD_STRINGISE(); } template <> std::string DoStringise(const VkCompositeAlphaFlagBitsKHR &el) { - string ret; - - if(el & VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR) - ret += " | VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR"; - if(el & VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR) - ret += " | VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR"; - if(el & VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR) - ret += " | VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR"; - if(el & VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR) - ret += " | VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR"; - - if(!ret.empty()) - ret = ret.substr(3); - - return ret; + BEGIN_BITFIELD_STRINGISE(VkCompositeAlphaFlagBitsKHR); + { + STRINGISE_BITFIELD_BIT(VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_COMPOSITE_ALPHA_PRE_MULTIPLIED_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_COMPOSITE_ALPHA_POST_MULTIPLIED_BIT_KHR); + STRINGISE_BITFIELD_BIT(VK_COMPOSITE_ALPHA_INHERIT_BIT_KHR); + } + END_BITFIELD_STRINGISE(); } template <> @@ -1993,44 +2014,44 @@ std::string DoStringise(const VkChromaLocation &el) template <> std::string DoStringise(const VkDeviceQueueCreateFlagBits &el) { - BEGIN_ENUM_STRINGISE(VkDeviceQueueCreateFlagBits); + BEGIN_BITFIELD_STRINGISE(VkDeviceQueueCreateFlagBits); { - STRINGISE_ENUM(VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT) + STRINGISE_BITFIELD_BIT(VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT) } - END_ENUM_STRINGISE(); + END_BITFIELD_STRINGISE(); } template <> std::string DoStringise(const VkSubpassDescriptionFlagBits &el) { - BEGIN_ENUM_STRINGISE(VkSubpassDescriptionFlagBits); + BEGIN_BITFIELD_STRINGISE(VkSubpassDescriptionFlagBits); { - STRINGISE_ENUM(VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX) - STRINGISE_ENUM(VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX) + STRINGISE_BITFIELD_BIT(VK_SUBPASS_DESCRIPTION_PER_VIEW_ATTRIBUTES_BIT_NVX) + STRINGISE_BITFIELD_BIT(VK_SUBPASS_DESCRIPTION_PER_VIEW_POSITION_X_ONLY_BIT_NVX) } - END_ENUM_STRINGISE(); + END_BITFIELD_STRINGISE(); } template <> std::string DoStringise(const VkDescriptorSetLayoutCreateFlagBits &el) { - BEGIN_ENUM_STRINGISE(VkDescriptorSetLayoutCreateFlagBits); + BEGIN_BITFIELD_STRINGISE(VkDescriptorSetLayoutCreateFlagBits); { - STRINGISE_ENUM(VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR) - STRINGISE_ENUM(VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT) + STRINGISE_BITFIELD_BIT(VK_DESCRIPTOR_SET_LAYOUT_CREATE_PUSH_DESCRIPTOR_BIT_KHR) + STRINGISE_BITFIELD_BIT(VK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BIT_EXT) } - END_ENUM_STRINGISE(); + END_BITFIELD_STRINGISE(); } template <> std::string DoStringise(const VkSwapchainCreateFlagBitsKHR &el) { - BEGIN_ENUM_STRINGISE(VkSwapchainCreateFlagBitsKHR); + BEGIN_BITFIELD_STRINGISE(VkSwapchainCreateFlagBitsKHR); { - STRINGISE_ENUM(VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR) - STRINGISE_ENUM(VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR) + STRINGISE_BITFIELD_BIT(VK_SWAPCHAIN_CREATE_PROTECTED_BIT_KHR) + STRINGISE_BITFIELD_BIT(VK_SWAPCHAIN_CREATE_SPLIT_INSTANCE_BIND_REGIONS_BIT_KHR) } - END_ENUM_STRINGISE(); + END_BITFIELD_STRINGISE(); } template <> @@ -2046,6 +2067,212 @@ std::string DoStringise(const VkQueueGlobalPriorityEXT &el) END_ENUM_STRINGISE(); } +template <> +std::string DoStringise(const VkDeviceEventTypeEXT &el) +{ + BEGIN_ENUM_STRINGISE(VkDeviceEventTypeEXT); + { + STRINGISE_ENUM(VK_DEVICE_EVENT_TYPE_DISPLAY_HOTPLUG_EXT) + } + END_ENUM_STRINGISE(); +} + +template <> +std::string DoStringise(const VkValidationCheckEXT &el) +{ + BEGIN_ENUM_STRINGISE(VkValidationCheckEXT); + { + STRINGISE_ENUM(VK_VALIDATION_CHECK_ALL_EXT) + STRINGISE_ENUM(VK_VALIDATION_CHECK_SHADERS_EXT) + } + END_ENUM_STRINGISE(); +} + +template <> +std::string DoStringise(const VkDriverIdKHR &el) +{ + BEGIN_ENUM_STRINGISE(VkDriverIdKHR); + { + STRINGISE_ENUM(VK_DRIVER_ID_AMD_PROPRIETARY_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_AMD_OPEN_SOURCE_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_MESA_RADV_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_INTEL_OPEN_SOURCE_MESA_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_IMAGINATION_PROPRIETARY_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_QUALCOMM_PROPRIETARY_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_ARM_PROPRIETARY_KHR) + STRINGISE_ENUM(VK_DRIVER_ID_GOOGLE_PASTEL_KHR) + } + END_ENUM_STRINGISE(); +} + +template <> +std::string DoStringise(const VkDisplayPowerStateEXT &el) +{ + BEGIN_ENUM_STRINGISE(VkDisplayPowerStateEXT); + { + STRINGISE_ENUM(VK_DISPLAY_POWER_STATE_OFF_EXT) + STRINGISE_ENUM(VK_DISPLAY_POWER_STATE_SUSPEND_EXT) + STRINGISE_ENUM(VK_DISPLAY_POWER_STATE_ON_EXT) + } + END_ENUM_STRINGISE(); +} + +template <> +std::string DoStringise(const VkDisplayEventTypeEXT &el) +{ + BEGIN_ENUM_STRINGISE(VkDisplayEventTypeEXT); + { + STRINGISE_ENUM(VK_DISPLAY_EVENT_TYPE_FIRST_PIXEL_OUT_EXT) + } + END_ENUM_STRINGISE(); +} + +template <> +std::string DoStringise(const VkPointClippingBehavior &el) +{ + BEGIN_ENUM_STRINGISE(VkPointClippingBehavior); + { + STRINGISE_ENUM(VK_POINT_CLIPPING_BEHAVIOR_ALL_CLIP_PLANES) + STRINGISE_ENUM(VK_POINT_CLIPPING_BEHAVIOR_USER_CLIP_PLANES_ONLY) + } + END_ENUM_STRINGISE(); +} + +template <> +std::string DoStringise(const VkSemaphoreImportFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkSemaphoreImportFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_SEMAPHORE_IMPORT_TEMPORARY_BIT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkFenceImportFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkFenceImportFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_FENCE_IMPORT_TEMPORARY_BIT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkExternalSemaphoreFeatureFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkExternalSemaphoreFeatureFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_SEMAPHORE_FEATURE_EXPORTABLE_BIT) + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_SEMAPHORE_FEATURE_IMPORTABLE_BIT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkExternalFenceFeatureFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkExternalFenceFeatureFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_FENCE_FEATURE_EXPORTABLE_BIT) + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_FENCE_FEATURE_IMPORTABLE_BIT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkSparseImageFormatFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkSparseImageFormatFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_SPARSE_IMAGE_FORMAT_SINGLE_MIPTAIL_BIT) + STRINGISE_BITFIELD_BIT(VK_SPARSE_IMAGE_FORMAT_ALIGNED_MIP_SIZE_BIT) + STRINGISE_BITFIELD_BIT(VK_SPARSE_IMAGE_FORMAT_NONSTANDARD_BLOCK_SIZE_BIT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkFormatFeatureFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkFormatFeatureFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_STORAGE_IMAGE_ATOMIC_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_ATOMIC_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BLEND_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_BLIT_SRC_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_BLIT_DST_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_TRANSFER_SRC_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_TRANSFER_DST_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_MIDPOINT_CHROMA_SAMPLES_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_LINEAR_FILTER_BIT) + STRINGISE_BITFIELD_BIT( + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_SEPARATE_RECONSTRUCTION_FILTER_BIT) + STRINGISE_BITFIELD_BIT( + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_BIT) + STRINGISE_BITFIELD_BIT( + VK_FORMAT_FEATURE_SAMPLED_IMAGE_YCBCR_CONVERSION_CHROMA_RECONSTRUCTION_EXPLICIT_FORCEABLE_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_DISJOINT_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_COSITED_CHROMA_SAMPLES_BIT) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG) + STRINGISE_BITFIELD_BIT(VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_MINMAX_BIT_EXT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkExternalMemoryFeatureFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkExternalMemoryFeatureFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_MEMORY_FEATURE_DEDICATED_ONLY_BIT) + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_MEMORY_FEATURE_EXPORTABLE_BIT) + STRINGISE_BITFIELD_BIT(VK_EXTERNAL_MEMORY_FEATURE_IMPORTABLE_BIT) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkDisplayPlaneAlphaFlagBitsKHR &el) +{ + BEGIN_BITFIELD_STRINGISE(VkDisplayPlaneAlphaFlagBitsKHR); + { + STRINGISE_BITFIELD_BIT(VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR) + STRINGISE_BITFIELD_BIT(VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR) + STRINGISE_BITFIELD_BIT(VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR) + STRINGISE_BITFIELD_BIT(VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR) + } + END_BITFIELD_STRINGISE(); +} + +template <> +std::string DoStringise(const VkSubgroupFeatureFlagBits &el) +{ + BEGIN_BITFIELD_STRINGISE(VkSubgroupFeatureFlagBits); + { + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_BASIC_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_VOTE_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_ARITHMETIC_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_BALLOT_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_SHUFFLE_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_CLUSTERED_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_QUAD_BIT) + STRINGISE_BITFIELD_BIT(VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV) + } + END_BITFIELD_STRINGISE(); +} + template <> std::string DoStringise(const VkExtent3D &el) {