From 969f6ccc94e9a80e01feb2f2d1f2447fb99e2c22 Mon Sep 17 00:00:00 2001 From: "Matias N. Goldberg" Date: Tue, 26 Nov 2024 20:14:23 -0300 Subject: [PATCH] Cosmetic changes --- RenderSystems/Vulkan/src/OgreVulkanDevice.cpp | 14 +++++++++++--- .../Vulkan/src/OgreVulkanRenderSystem.cpp | 2 ++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/RenderSystems/Vulkan/src/OgreVulkanDevice.cpp b/RenderSystems/Vulkan/src/OgreVulkanDevice.cpp index 958bf34c04..2c7bba5a92 100644 --- a/RenderSystems/Vulkan/src/OgreVulkanDevice.cpp +++ b/RenderSystems/Vulkan/src/OgreVulkanDevice.cpp @@ -426,7 +426,7 @@ namespace Ogre map::type sameNameCounter; mVulkanPhysicalDevices.clear(); mVulkanPhysicalDevices.reserve( devices.size() ); - for( auto device : devices ) + for( VkPhysicalDevice device : devices ) { VkPhysicalDeviceProperties deviceProps; vkGetPhysicalDeviceProperties( device, &deviceProps ); @@ -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() ) @@ -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; @@ -823,7 +831,7 @@ namespace Ogre uint32 maxComputeQueues, uint32 maxTransferQueues ) { FastArray deviceExtensions; - for( auto &ext : availableExtensions ) + for( const VkExtensionProperties &ext : availableExtensions ) { const String extensionName = ext.extensionName; LogManager::getSingleton().logMessage( "Vulkan: Found device extension: " + extensionName ); diff --git a/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp b/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp index 1e26a37420..3dbf26fa1d 100644 --- a/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp +++ b/RenderSystems/Vulkan/src/OgreVulkanRenderSystem.cpp @@ -1086,8 +1086,10 @@ namespace Ogre mNativeShadingLanguageVersion = 450; if( !mInstance ) + { mInstance = std::make_shared( Root::getSingleton().getAppName(), nullptr, dbgFunc, this ); + } mActiveDevice = externalDevice ? VulkanPhysicalDevice( { externalDevice->physicalDevice, 0, String() } )