Skip to content

Commit

Permalink
Cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Nov 26, 2024
1 parent c6443e0 commit 969f6cc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 11 additions & 3 deletions RenderSystems/Vulkan/src/OgreVulkanDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ namespace Ogre
map<String, unsigned>::type sameNameCounter;
mVulkanPhysicalDevices.clear();
mVulkanPhysicalDevices.reserve( devices.size() );
for( auto device : devices )
for( VkPhysicalDevice device : devices )
{
VkPhysicalDeviceProperties deviceProps;
vkGetPhysicalDeviceProperties( device, &deviceProps );
Expand All @@ -452,9 +452,13 @@ namespace Ogre
{
// return requested device
if( !name.empty() )
for( auto &elem : mVulkanPhysicalDevices )
{
for( const VulkanPhysicalDevice &elem : mVulkanPhysicalDevices )
{
if( elem.title == name )
return &elem;
}
}

// return default device
if( !mVulkanPhysicalDevices.empty() )
Expand Down Expand Up @@ -631,11 +635,15 @@ namespace Ogre
destroy();

if( externalDevice )
{
LogManager::getSingleton().logMessage(
"Vulkan: Creating Vulkan Device from External VkVulkan handle" );
}
else
{
LogManager::getSingleton().logMessage( "Vulkan: Selected \"" + physicalDevice.title +
"\" physical device" );
}

mIsExternal = externalDevice != nullptr;

Expand Down Expand Up @@ -823,7 +831,7 @@ namespace Ogre
uint32 maxComputeQueues, uint32 maxTransferQueues )
{
FastArray<const char *> deviceExtensions;
for( auto &ext : availableExtensions )
for( const VkExtensionProperties &ext : availableExtensions )
{
const String extensionName = ext.extensionName;
LogManager::getSingleton().logMessage( "Vulkan: Found device extension: " + extensionName );
Expand Down
2 changes: 2 additions & 0 deletions RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1086,8 +1086,10 @@ namespace Ogre
mNativeShadingLanguageVersion = 450;

if( !mInstance )
{
mInstance = std::make_shared<VulkanInstance>( Root::getSingleton().getAppName(), nullptr,
dbgFunc, this );
}

mActiveDevice = externalDevice
? VulkanPhysicalDevice( { externalDevice->physicalDevice, 0, String() } )
Expand Down

0 comments on commit 969f6cc

Please sign in to comment.