Properly handle forward-declared structs

This commit is contained in:
David Dubois 2022-08-28 09:45:26 -07:00 committed by Charles Giessen
parent 00cf404e7b
commit 1fea63645a
2 changed files with 16 additions and 10 deletions

View File

@ -276,6 +276,9 @@ for command in device_commands:
elif text == '**': elif text == '**':
front_mods = '' front_mods = ''
back_mods = '** ' back_mods = '** '
elif text == 'struct**':
front_mods = 'struct '
back_mods = '** '
elif text == 'const*': elif text == 'const*':
front_mods = 'const ' front_mods = 'const '
back_mods = '* ' back_mods = '* '
@ -285,6 +288,9 @@ for command in device_commands:
elif text == 'const*const*': elif text == 'const*const*':
front_mods = 'const ' front_mods = 'const '
back_mods = '* const* ' back_mods = '* const* '
elif text == 'conststruct*':
front_mods = 'const struct '
back_mods = '* '
if i == args_count and arg_type == 'VkDevice': if i == args_count and arg_type == 'VkDevice':
args_names += arg_name args_names += arg_name
if i > 0: if i > 0:

View File

@ -1995,12 +1995,12 @@ struct DispatchTable {
} }
#endif #endif
#if (defined(VK_ANDROID_external_memory_android_hardware_buffer)) #if (defined(VK_ANDROID_external_memory_android_hardware_buffer))
VkResult getAndroidHardwareBufferPropertiesANDROID(AHardwareBuffer buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) const noexcept { VkResult getAndroidHardwareBufferPropertiesANDROID(const struct AHardwareBuffer* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties) const noexcept {
return fp_vkGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties); return fp_vkGetAndroidHardwareBufferPropertiesANDROID(device, buffer, pProperties);
} }
#endif #endif
#if (defined(VK_ANDROID_external_memory_android_hardware_buffer)) #if (defined(VK_ANDROID_external_memory_android_hardware_buffer))
VkResult getMemoryAndroidHardwareBufferANDROID(const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, AHardwareBuffer pBuffer) const noexcept { VkResult getMemoryAndroidHardwareBufferANDROID(const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo, struct AHardwareBuffer** pBuffer) const noexcept {
return fp_vkGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer); return fp_vkGetMemoryAndroidHardwareBufferANDROID(device, pInfo, pBuffer);
} }
#endif #endif
@ -2625,13 +2625,13 @@ struct DispatchTable {
} }
#endif #endif
#if (defined(VK_KHR_video_queue)) #if (defined(VK_KHR_video_queue))
VkResult getVideoSessionMemoryRequirementsKHR(VkVideoSessionKHR videoSession, uint32_t* pVideoSessionMemoryRequirementsCount, VkVideoGetMemoryPropertiesKHR* pVideoSessionMemoryRequirements) const noexcept { VkResult getVideoSessionMemoryRequirementsKHR(VkVideoSessionKHR videoSession, uint32_t* pMemoryRequirementsCount, VkVideoSessionMemoryRequirementsKHR* pMemoryRequirements) const noexcept {
return fp_vkGetVideoSessionMemoryRequirementsKHR(device, videoSession, pVideoSessionMemoryRequirementsCount, pVideoSessionMemoryRequirements); return fp_vkGetVideoSessionMemoryRequirementsKHR(device, videoSession, pMemoryRequirementsCount, pMemoryRequirements);
} }
#endif #endif
#if (defined(VK_KHR_video_queue)) #if (defined(VK_KHR_video_queue))
VkResult bindVideoSessionMemoryKHR(VkVideoSessionKHR videoSession, uint32_t videoSessionBindMemoryCount, const VkVideoBindMemoryKHR* pVideoSessionBindMemories) const noexcept { VkResult bindVideoSessionMemoryKHR(VkVideoSessionKHR videoSession, uint32_t bindSessionMemoryInfoCount, const VkBindVideoSessionMemoryInfoKHR* pBindSessionMemoryInfos) const noexcept {
return fp_vkBindVideoSessionMemoryKHR(device, videoSession, videoSessionBindMemoryCount, pVideoSessionBindMemories); return fp_vkBindVideoSessionMemoryKHR(device, videoSession, bindSessionMemoryInfoCount, pBindSessionMemoryInfos);
} }
#endif #endif
#if (defined(VK_KHR_video_decode_queue)) #if (defined(VK_KHR_video_decode_queue))