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

@@ -11,6 +11,7 @@
#include <Nazara/Renderer/Enums.hpp>
#include <Nazara/VulkanRenderer/Config.hpp>
#include <Nazara/VulkanRenderer/Wrapper/Loader.hpp>
#include <NazaraUtils/StringHash.hpp>
#include <vulkan/vulkan_core.h>
#include <string>
#include <unordered_set>
@@ -88,8 +89,8 @@ namespace Nz::Vk
void InstallDebugMessageCallback(RenderAPIValidationLevel validationLevel);
inline bool IsExtensionLoaded(const std::string& extensionName) const;
inline bool IsLayerLoaded(const std::string& layerName) const;
inline bool IsExtensionLoaded(std::string_view extensionName) const;
inline bool IsLayerLoaded(std::string_view layerName) const;
inline bool IsValid() const;
Instance& operator=(const Instance&) = delete;
@@ -110,8 +111,8 @@ namespace Nz::Vk
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;
VkAllocationCallbacks m_allocator;
VkInstance m_instance;
mutable VkResult m_lastErrorCode;