Skip to content

Commit

Permalink
vk_instance.cpp: fix getting driver_id for vulkan device (PabloMK7#67)
Browse files Browse the repository at this point in the history
* vk_instance.cpp: fix getting driver_id for vulkan device

* apply clang-format (fixed)
  • Loading branch information
suDisdain authored Apr 10, 2024
1 parent 9dfe3eb commit e26ceab
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/video_core/renderer_vulkan/vk_instance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit e26ceab

Please sign in to comment.