From 46a39ea67a696ff5f8b3e9765bdba731facf6f3d Mon Sep 17 00:00:00 2001 From: Tobias Frisch <tfrisch@uni-koblenz.de> Date: Mon, 30 Jan 2023 14:03:38 +0100 Subject: [PATCH] Remove implicit conversion and remove debug logging Signed-off-by: Tobias Frisch <tfrisch@uni-koblenz.de> --- src/vkcv/DescriptorSetManager.cpp | 7 +++---- src/vkcv/DescriptorSetManager.hpp | 4 ++-- src/vkcv/GraphicsPipelineManager.cpp | 9 --------- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/vkcv/DescriptorSetManager.cpp b/src/vkcv/DescriptorSetManager.cpp index 76f36e47..605e5d3c 100644 --- a/src/vkcv/DescriptorSetManager.cpp +++ b/src/vkcv/DescriptorSetManager.cpp @@ -54,17 +54,16 @@ namespace vkcv { } } - vk::DescriptorPool DescriptorSetManager::allocateDescriptorPool() { + bool DescriptorSetManager::allocateDescriptorPool() { vk::DescriptorPool pool; if (getCore().getContext().getDevice().createDescriptorPool(&m_PoolInfo, nullptr, &pool) != vk::Result::eSuccess) { vkcv_log(LogLevel::WARNING, "Failed to allocate descriptor pool"); - pool = nullptr; + return false; } else { m_Pools.push_back(pool); + return true; } - - return pool; } DescriptorSetManager::DescriptorSetManager() noexcept : diff --git a/src/vkcv/DescriptorSetManager.hpp b/src/vkcv/DescriptorSetManager.hpp index ae3f879c..06ea6dd7 100644 --- a/src/vkcv/DescriptorSetManager.hpp +++ b/src/vkcv/DescriptorSetManager.hpp @@ -59,9 +59,9 @@ namespace vkcv { * constructor is called initially in the constructor and then every time the pool runs * out memory. * - * @return a DescriptorPool object + * @return whether a DescriptorPool object could be created */ - vk::DescriptorPool allocateDescriptorPool(); + bool allocateDescriptorPool(); public: /** diff --git a/src/vkcv/GraphicsPipelineManager.cpp b/src/vkcv/GraphicsPipelineManager.cpp index 767616f7..4f8a217d 100644 --- a/src/vkcv/GraphicsPipelineManager.cpp +++ b/src/vkcv/GraphicsPipelineManager.cpp @@ -706,15 +706,6 @@ namespace vkcv { 0 ); - vkcv_log(LogLevel::RAW_INFO, "STAGES: %lu", shaderStages.size()); - for (const auto& shaderStage : shaderStages) { - vkcv_log(LogLevel::RAW_INFO, "STAGE: %s %s %s", - shaderStage.pName, - vk::to_string(shaderStage.stage).c_str(), - vk::to_string(shaderStage.flags).c_str() - ); - } - auto pipelineResult = getCore().getContext().getDevice().createGraphicsPipeline( nullptr, graphicsPipelineCreateInfo ); -- GitLab