Commit 948cec53 authored by Florian Oetke's avatar Florian Oetke
Browse files

disabled vulkan debugging in release build (because FUCK YOU NVIDIA)

parent cb6eadc2
Pipeline #3393 passed with stage
in 17 minutes and 27 seconds
...@@ -72,6 +72,7 @@ namespace mirrage { ...@@ -72,6 +72,7 @@ namespace mirrage {
void vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer); void vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer);
private: private:
bool _debug;
asset::Asset_manager& _assets; asset::Asset_manager& _assets;
std::string _name; std::string _name;
asset::Ptr<Graphics_settings> _settings; asset::Ptr<Graphics_settings> _settings;
......
...@@ -234,7 +234,7 @@ namespace mirrage::graphic { ...@@ -234,7 +234,7 @@ namespace mirrage::graphic {
uint32_t engineVersion, uint32_t engineVersion,
bool debug, bool debug,
asset::Asset_manager& assets) asset::Asset_manager& assets)
: _assets(assets), _name(appName) : _debug(debug), _assets(assets), _name(appName)
{ {
auto maybe_settings = assets.load_maybe<Graphics_settings>("cfg:graphics"_aid); auto maybe_settings = assets.load_maybe<Graphics_settings>("cfg:graphics"_aid);
...@@ -270,9 +270,9 @@ namespace mirrage::graphic { ...@@ -270,9 +270,9 @@ namespace mirrage::graphic {
add_present_extensions(required_extensions, _windows); add_present_extensions(required_extensions, _windows);
auto optional_extensions = std::vector<const char*>{}; auto optional_extensions = std::vector<const char*>{};
if(debug) {
required_extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME); required_extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
if(debug) {
_enabled_layers = check_layers({"VK_LAYER_LUNARG_image", _enabled_layers = check_layers({"VK_LAYER_LUNARG_image",
"VK_LAYER_LUNARG_parameter_validation", "VK_LAYER_LUNARG_parameter_validation",
"VK_LAYER_LUNARG_core_validation", "VK_LAYER_LUNARG_core_validation",
...@@ -319,7 +319,6 @@ namespace mirrage::graphic { ...@@ -319,7 +319,6 @@ namespace mirrage::graphic {
| vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance, | vk::DebugUtilsMessageTypeFlagBitsEXT::ePerformance,
&debugCallback}; &debugCallback};
_debug_callback = _instance->createDebugUtilsMessengerEXTUnique(create_info); _debug_callback = _instance->createDebugUtilsMessengerEXTUnique(create_info);
}
#ifndef MIRRAGE_IGNORE_VULKAN_LABELS #ifndef MIRRAGE_IGNORE_VULKAN_LABELS
_vkCmdBeginDebugUtilsLabelEXT = reinterpret_cast<PFN_vkCmdBeginDebugUtilsLabelEXT>( _vkCmdBeginDebugUtilsLabelEXT = reinterpret_cast<PFN_vkCmdBeginDebugUtilsLabelEXT>(
...@@ -334,6 +333,7 @@ namespace mirrage::graphic { ...@@ -334,6 +333,7 @@ namespace mirrage::graphic {
"function not found."; "function not found.";
} }
#endif #endif
}
for(auto&& [_, window] : _windows) { for(auto&& [_, window] : _windows) {
(void) _; (void) _;
...@@ -700,12 +700,12 @@ namespace mirrage::graphic { ...@@ -700,12 +700,12 @@ namespace mirrage::graphic {
void Context::vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer, void Context::vkCmdBeginDebugUtilsLabelEXT(VkCommandBuffer commandBuffer,
const VkDebugUtilsLabelEXT* pLabelInfo) const VkDebugUtilsLabelEXT* pLabelInfo)
{ {
if(_vkCmdBeginDebugUtilsLabelEXT) if(_debug && _vkCmdBeginDebugUtilsLabelEXT)
_vkCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo); _vkCmdBeginDebugUtilsLabelEXT(commandBuffer, pLabelInfo);
} }
void Context::vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer) void Context::vkCmdEndDebugUtilsLabelEXT(VkCommandBuffer commandBuffer)
{ {
if(_vkCmdEndDebugUtilsLabelEXT) if(_debug && _vkCmdEndDebugUtilsLabelEXT)
_vkCmdEndDebugUtilsLabelEXT(commandBuffer); _vkCmdEndDebugUtilsLabelEXT(commandBuffer);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment