Skip to content

Commit

Permalink
Add AMDX functions to header version workaround list
Browse files Browse the repository at this point in the history
Header update 1.3.298 changed the definition of functions. Should have caught
this during the PR review, as well better late than never.
  • Loading branch information
charles-lunarg committed Oct 22, 2024
1 parent 01018f5 commit f749132
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 5 additions & 1 deletion script/generate_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@
'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):
Expand Down
24 changes: 12 additions & 12 deletions src/VkBootstrapDispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -2623,16 +2623,16 @@ struct DispatchTable {
#if (defined(VK_AMDX_shader_enqueue))
fp_vkCreateExecutionGraphPipelinesAMDX = reinterpret_cast<PFN_vkCreateExecutionGraphPipelinesAMDX>(procAddr(device, "vkCreateExecutionGraphPipelinesAMDX"));
#endif
#if (defined(VK_AMDX_shader_enqueue))
#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298
fp_vkCmdInitializeGraphScratchMemoryAMDX = reinterpret_cast<PFN_vkCmdInitializeGraphScratchMemoryAMDX>(procAddr(device, "vkCmdInitializeGraphScratchMemoryAMDX"));
#endif
#if (defined(VK_AMDX_shader_enqueue))
#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298
fp_vkCmdDispatchGraphAMDX = reinterpret_cast<PFN_vkCmdDispatchGraphAMDX>(procAddr(device, "vkCmdDispatchGraphAMDX"));
#endif
#if (defined(VK_AMDX_shader_enqueue))
#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298
fp_vkCmdDispatchGraphIndirectAMDX = reinterpret_cast<PFN_vkCmdDispatchGraphIndirectAMDX>(procAddr(device, "vkCmdDispatchGraphIndirectAMDX"));
#endif
#if (defined(VK_AMDX_shader_enqueue))
#if ((defined(VK_AMDX_shader_enqueue))) && VK_HEADER_VERSION >= 298
fp_vkCmdDispatchGraphIndirectCountAMDX = reinterpret_cast<PFN_vkCmdDispatchGraphIndirectCountAMDX>(procAddr(device, "vkCmdDispatchGraphIndirectCountAMDX"));
#endif
#if (defined(VK_KHR_maintenance6))
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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{};
Expand Down

0 comments on commit f749132

Please sign in to comment.