Skip to content

Commit abf0fd3

Browse files
committed
Support older Vulkan headers for driver detection
1 parent 8bc4ed2 commit abf0fd3

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Engine/Runtime/Engine.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ void NextEngine::RegisterReflection()
8383

8484
namespace
8585
{
86+
// Older Android NDK Vulkan headers do not name this newer registry value yet.
87+
constexpr VkDriverId kMesaKosmicKrispDriverId = static_cast<VkDriverId>(28);
88+
8689
VkDriverId GetDriverId(VkPhysicalDevice physicalDevice)
8790
{
8891
VkPhysicalDeviceDriverProperties driverProperties{};
@@ -97,7 +100,7 @@ namespace
97100

98101
bool IsKosmicKrispDriver(VkPhysicalDevice physicalDevice)
99102
{
100-
return GetDriverId(physicalDevice) == VK_DRIVER_ID_MESA_KOSMICKRISP;
103+
return GetDriverId(physicalDevice) == kMesaKosmicKrispDriverId;
101104
}
102105

103106
Vulkan::ERendererType ResolveRendererType(

0 commit comments

Comments
 (0)