Optimize out a lot of std::string construction and allocations (#415)

Update CommandLineParameters.hpp

Update CommandLineParametersTests.cpp

Update WebContext.hpp

xmake check-files -f

Fix MaterialPassRegistry
This commit is contained in:
Jérôme Leclercq
2023-12-30 14:50:57 +01:00
committed by GitHub
parent f7c9060364
commit 79ec135af7
57 changed files with 219 additions and 210 deletions

View File

@@ -14,6 +14,7 @@
#include <Nazara/VulkanRenderer/Wrapper/Loader.hpp>
#include <Nazara/VulkanRenderer/Wrapper/PhysicalDevice.hpp>
#include <NazaraUtils/EnumArray.hpp>
#include <NazaraUtils/StringHash.hpp>
#include <vulkan/vulkan_core.h>
#include <array>
#include <memory>
@@ -62,8 +63,8 @@ namespace Nz
inline PFN_vkVoidFunction GetProcAddr(const char* name, bool allowInstanceFallback);
QueueHandle GetQueue(UInt32 queueFamilyIndex, UInt32 queueIndex);
inline bool IsExtensionLoaded(const std::string& extensionName);
inline bool IsLayerLoaded(const std::string& layerName);
inline bool IsExtensionLoaded(std::string_view extensionName);
inline bool IsLayerLoaded(std::string_view layerName);
inline void SetDebugName(VkObjectType objectType, UInt64 objectHandle, const char* name);
inline void SetDebugName(VkObjectType objectType, UInt64 objectHandle, std::string_view name);
@@ -107,8 +108,8 @@ namespace Nz
struct InternalData;
std::unique_ptr<InternalData> m_internalData;
std::unordered_set<std::string> m_loadedExtensions;
std::unordered_set<std::string> m_loadedLayers;
std::unordered_set<std::string, StringHash<>, std::equal_to<>> m_loadedExtensions;
std::unordered_set<std::string, StringHash<>, std::equal_to<>> m_loadedLayers;
std::vector<QueueFamilyInfo> m_enabledQueuesInfos;
std::vector<const QueueList*> m_queuesByFamily;
Instance& m_instance;