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

@ -1175,6 +1175,7 @@ template<typename T> VkObjectType GetObjectType() {
return VK_OBJECT_TYPE_UNKNOWN;
}
#if VK_USE_64_BIT_PTR_DEFINES == 1
template<> inline VkObjectType GetObjectType<VkBuffer>() { return VK_OBJECT_TYPE_BUFFER; }
template<> inline VkObjectType GetObjectType<VkImage>() { return VK_OBJECT_TYPE_IMAGE; }
template<> inline VkObjectType GetObjectType<VkInstance>() { return VK_OBJECT_TYPE_INSTANCE; }
@ -1226,6 +1227,7 @@ template<> inline VkObjectType GetObjectType<VkMicromapEXT>() { return VK_OBJECT
template<> inline VkObjectType GetObjectType<VkOpticalFlowSessionNV>() { return VK_OBJECT_TYPE_OPTICAL_FLOW_SESSION_NV; }
template<> inline VkObjectType GetObjectType<VkShaderEXT>() { return VK_OBJECT_TYPE_SHADER_EXT; }
#endif // VK_USE_64_BIT_PTR_DEFINES == 1
} // namespace vku
// NOLINTEND