Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

Commit

Permalink
Fixed small mistake in device selection loop. Added info about select…
Browse files Browse the repository at this point in the history
…ed device name in Tutorial01.
  • Loading branch information
Ekzuzy committed Sep 19, 2017
1 parent 71151a6 commit 340a7a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions Project/Common/VulkanCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ namespace ApiWithoutSecrets {
for( uint32_t i = 0; i < num_devices; ++i ) {
if( CheckPhysicalDeviceProperties( physical_devices[i], selected_graphics_queue_family_index, selected_present_queue_family_index ) ) {
Vulkan.PhysicalDevice = physical_devices[i];
break;
}
}
if( Vulkan.PhysicalDevice == VK_NULL_HANDLE ) {
Expand Down
2 changes: 2 additions & 0 deletions Project/Tutorial01/Tutorial01.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ namespace ApiWithoutSecrets {
for( uint32_t i = 0; i < num_devices; ++i ) {
if( CheckPhysicalDeviceProperties( physical_devices[i], selected_queue_family_index ) ) {
selected_physical_device = physical_devices[i];
break;
}
}
if( selected_physical_device == VK_NULL_HANDLE ) {
Expand Down Expand Up @@ -235,6 +236,7 @@ namespace ApiWithoutSecrets {
if( (queue_family_properties[i].queueCount > 0) &&
(queue_family_properties[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) ) {
queue_family_index = i;
std::cout << "Selected device: " << device_properties.deviceName << std::endl;
return true;
}
}
Expand Down
1 change: 1 addition & 0 deletions Project/Tutorial02/Tutorial02.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ namespace ApiWithoutSecrets {
for( uint32_t i = 0; i < num_devices; ++i ) {
if( CheckPhysicalDeviceProperties( physical_devices[i], selected_graphics_queue_family_index, selected_present_queue_family_index ) ) {
Vulkan.PhysicalDevice = physical_devices[i];
break;
}
}
if( Vulkan.PhysicalDevice == VK_NULL_HANDLE ) {
Expand Down

0 comments on commit 340a7a6

Please sign in to comment.