util: Fix vku::GetObjectType() broken for 32 bit builds

Non Dispatchable handles are not typed in 32 bit builds, so the
vku::GetObjectHandle() helper fails to compile. The solution is to just
not define the helper in 32 bit builds.
This commit is contained in:
Charles Giessen 2023-10-05 10:44:23 -06:00 committed by Charles Giessen
parent 859486391c
commit 85f06aeb61
2 changed files with 4 additions and 0 deletions

View file

@ -126,12 +126,14 @@ template<typename T> VkObjectType GetObjectType() {
return VK_OBJECT_TYPE_UNKNOWN;
}
#if VK_USE_64_BIT_PTR_DEFINES == 1
''')
for handle in self.vk.handles.values():
out.extend([f'#ifdef {handle.protect}\n'] if handle.protect else [])
out.append(f'template<> inline VkObjectType GetObjectType<{handle.name}>() {{ return {handle.type}; }}\n')
out.extend([f'#endif // {handle.protect}\n'] if handle.protect else [])
out.append('''
#endif // VK_USE_64_BIT_PTR_DEFINES == 1
} // namespace vku
\n''')