vk_instance.cpp: fix getting driver_id for vulkan device (#53)

* vk_instance.cpp: fix getting driver_id for vulkan device

* apply clang-format (fixed)

Co-authored-by: Malachi <malachicapela@gmail.com>
This commit is contained in:
Reg Tiangha 2024-04-12 11:39:04 -06:00 committed by GitHub
parent 563be55156
commit 0cc7cb4e9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -406,9 +406,15 @@ bool Instance::CreateDevice() {
vk::PhysicalDevicePipelineCreationCacheControlFeaturesEXT,
vk::PhysicalDeviceFragmentShaderBarycentricFeaturesKHR>();
const vk::StructureChain properties_chain =
physical_device.getProperties2<vk::PhysicalDeviceProperties2,
vk::PhysicalDevicePortabilitySubsetPropertiesKHR,
vk::PhysicalDeviceExternalMemoryHostPropertiesEXT>();
physical_device
.getProperties2<vk::PhysicalDeviceProperties2, vk::PhysicalDeviceDriverProperties,
vk::PhysicalDevicePortabilitySubsetPropertiesKHR,
vk::PhysicalDeviceExternalMemoryHostPropertiesEXT>();
const vk::PhysicalDeviceDriverProperties driver =
properties_chain.get<vk::PhysicalDeviceDriverProperties>();
driver_id = driver.driverID;
vendor_name = driver.driverName.data();
features = feature_chain.get().features;
if (available_extensions.empty()) {