Fix issues with debug layers

This commit is contained in:
2021-07-29 15:32:23 +02:00
parent 312ac14bef
commit 582a82d9b4
3 changed files with 12 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ namespace openVulkanoCpp::Vulkan
const std::initializer_list<std::string> activeValidationLayerNames = { const std::initializer_list<std::string> activeValidationLayerNames = {
"VK_LAYER_LUNARG_assistant_layer", "VK_LAYER_LUNARG_assistant_layer",
"VK_LAYER_LUNARG_standard_validation", "VK_LAYER_LUNARG_standard_validation",
"VK_LAYER_KHRONOS_validation",
//"VK_EXT_debug_marker", //"VK_EXT_debug_marker",
#ifdef RENDER_DOC #ifdef RENDER_DOC
"VK_LAYER_RENDERDOC_Capture", // RenderDoc must be open for this layer to work! "VK_LAYER_RENDERDOC_Capture", // RenderDoc must be open for this layer to work!
@@ -29,7 +30,7 @@ namespace openVulkanoCpp::Vulkan
auto layers = vk::enumerateInstanceLayerProperties(); auto layers = vk::enumerateInstanceLayerProperties();
for (const auto& layer: layers) for (const auto& layer: layers)
{ {
availableLayers.insert(layer.layerName); availableLayers.insert(layer.layerName.data());
} }
Logger::RENDER->debug("Available Vulkan Validation Layers: {0}", fmt::join(availableLayers, ", ")); Logger::RENDER->debug("Available Vulkan Validation Layers: {0}", fmt::join(availableLayers, ", "));
} }

View File

@@ -31,7 +31,7 @@ namespace openVulkanoCpp
RenderPass() = default; RenderPass() = default;
~RenderPass() ~RenderPass() override
{ {
if (frameBuffer) RenderPass::Close(); if (frameBuffer) RenderPass::Close();
} }

View File

@@ -1,5 +1,12 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
#pragma once #pragma once
#include "vulkan/vulkan.hpp"
#include <vulkan/vulkan.hpp>
namespace openVulkanoCpp namespace openVulkanoCpp
{ {
@@ -12,4 +19,4 @@ namespace openVulkanoCpp
virtual void Record(vk::CommandBuffer& cmdBuffer, uint32_t bufferId) = 0; virtual void Record(vk::CommandBuffer& cmdBuffer, uint32_t bufferId) = 0;
}; };
} }
} }