From 7fcd5d04c4f1378d4cd3e8e87c909d9ec7d65a5f Mon Sep 17 00:00:00 2001 From: Charles Giessen Date: Tue, 22 Oct 2024 12:43:56 -0500 Subject: [PATCH] Add AMDX functions to header version workaround list Header update 1.3.298 changed the definition of functions. Should have caught this during the PR review, as well better late than never. --- script/generate_dispatch.py | 6 +++++- src/VkBootstrapDispatch.h | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/script/generate_dispatch.py b/script/generate_dispatch.py index beccde6..7f4c347 100644 --- a/script/generate_dispatch.py +++ b/script/generate_dispatch.py @@ -107,7 +107,11 @@ HEADER_VERSION_WORKAROUNDS = { 'vkGetLatencyTimingsNV': '271', # Changed API parameters 'vkCmdSetDiscardRectangleEnableEXT': '241', # new function in older extension 'vkCmdSetDiscardRectangleModeEXT': '241', # new function in older extension - 'vkCmdSetExclusiveScissorEnableNV': '241', # new function in older extension + 'vkCmdSetExclusiveScissorEnableNV': '241', # Changed API parameters + 'vkCmdInitializeGraphScratchMemoryAMDX': '298', # Changed API parameters + 'vkCmdDispatchGraphAMDX': '298', # Changed API parameters + 'vkCmdDispatchGraphIndirectAMDX': '298', # Changed API parameters + 'vkCmdDispatchGraphIndirectCountAMDX': '298', # Changed API parameters } def get_macro_guard(reqs_collection, command_name): diff --git a/src/VkBootstrapDispatch.h b/src/VkBootstrapDispatch.h index 4a813ad..da87aa3 100644 --- a/src/VkBootstrapDispatch.h +++ b/src/VkBootstrapDispatch.h @@ -2623,16 +2623,16 @@ struct DispatchTable { #if (defined(VK_AMDX_shader_enqueue)) fp_vkCreateExecutionGraphPipelinesAMDX = reinterpret_cast(procAddr(device, "vkCreateExecutionGraphPipelinesAMDX")); #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 fp_vkCmdInitializeGraphScratchMemoryAMDX = reinterpret_cast(procAddr(device, "vkCmdInitializeGraphScratchMemoryAMDX")); #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 fp_vkCmdDispatchGraphAMDX = reinterpret_cast(procAddr(device, "vkCmdDispatchGraphAMDX")); #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 fp_vkCmdDispatchGraphIndirectAMDX = reinterpret_cast(procAddr(device, "vkCmdDispatchGraphIndirectAMDX")); #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 fp_vkCmdDispatchGraphIndirectCountAMDX = reinterpret_cast(procAddr(device, "vkCmdDispatchGraphIndirectCountAMDX")); #endif #if (defined(VK_KHR_maintenance6)) @@ -5169,22 +5169,22 @@ struct DispatchTable { return fp_vkCreateExecutionGraphPipelinesAMDX(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); } #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 void cmdInitializeGraphScratchMemoryAMDX(VkCommandBuffer commandBuffer, VkPipeline executionGraph, VkDeviceAddress scratch, VkDeviceSize scratchSize) const noexcept { fp_vkCmdInitializeGraphScratchMemoryAMDX(commandBuffer, executionGraph, scratch, scratchSize); } #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 void cmdDispatchGraphAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo) const noexcept { fp_vkCmdDispatchGraphAMDX(commandBuffer, scratch, scratchSize, pCountInfo); } #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 void cmdDispatchGraphIndirectAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, const VkDispatchGraphCountInfoAMDX* pCountInfo) const noexcept { fp_vkCmdDispatchGraphIndirectAMDX(commandBuffer, scratch, scratchSize, pCountInfo); } #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 void cmdDispatchGraphIndirectCountAMDX(VkCommandBuffer commandBuffer, VkDeviceAddress scratch, VkDeviceSize scratchSize, VkDeviceAddress countInfo) const noexcept { fp_vkCmdDispatchGraphIndirectCountAMDX(commandBuffer, scratch, scratchSize, countInfo); } @@ -7648,22 +7648,22 @@ struct DispatchTable { #else void * fp_vkCreateExecutionGraphPipelinesAMDX{}; #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 PFN_vkCmdInitializeGraphScratchMemoryAMDX fp_vkCmdInitializeGraphScratchMemoryAMDX = nullptr; #else void * fp_vkCmdInitializeGraphScratchMemoryAMDX{}; #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 PFN_vkCmdDispatchGraphAMDX fp_vkCmdDispatchGraphAMDX = nullptr; #else void * fp_vkCmdDispatchGraphAMDX{}; #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 PFN_vkCmdDispatchGraphIndirectAMDX fp_vkCmdDispatchGraphIndirectAMDX = nullptr; #else void * fp_vkCmdDispatchGraphIndirectAMDX{}; #endif -#if (defined(VK_AMDX_shader_enqueue)) +#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298 PFN_vkCmdDispatchGraphIndirectCountAMDX fp_vkCmdDispatchGraphIndirectCountAMDX = nullptr; #else void * fp_vkCmdDispatchGraphIndirectCountAMDX{};