fix(renderer): compilation issues on gcc

This commit is contained in:
light7734 2025-10-08 06:29:20 +03:30
parent e1360cabce
commit 81811351b8
Signed by: light7734
GPG key ID: 8C30176798F1A6BA
3 changed files with 12 additions and 16 deletions

View file

@ -140,49 +140,49 @@ void Instance::initialize_instance()
}; };
const auto settings = std::array<VkLayerSettingEXT, 7>({ const auto settings = std::array<VkLayerSettingEXT, 7>({
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "validate_core", .pSettingName = "validate_core",
.type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT,
.valueCount = 1, .valueCount = 1,
.pValues = &setting_validate_core, .pValues = &setting_validate_core,
}, },
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "validate_sync", .pSettingName = "validate_sync",
.type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT,
.valueCount = 1, .valueCount = 1,
.pValues = &setting_validate_sync, .pValues = &setting_validate_sync,
}, },
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "thread_safety", .pSettingName = "thread_safety",
.type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT,
.valueCount = 1, .valueCount = 1,
.pValues = &setting_thread_safety, .pValues = &setting_thread_safety,
}, },
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "debug_action", .pSettingName = "debug_action",
.type = VK_LAYER_SETTING_TYPE_STRING_EXT, .type = VK_LAYER_SETTING_TYPE_STRING_EXT,
.valueCount = 1, .valueCount = 1,
.pValues = static_cast<const void *>(&setting_debug_action), .pValues = static_cast<const void *>(&setting_debug_action),
}, },
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "report_flags", .pSettingName = "report_flags",
.type = VK_LAYER_SETTING_TYPE_STRING_EXT, .type = VK_LAYER_SETTING_TYPE_STRING_EXT,
.valueCount = setting_report_flags.size(), .valueCount = setting_report_flags.size(),
.pValues = static_cast<const void *>(setting_report_flags.data()), .pValues = static_cast<const void *>(setting_report_flags.data()),
}, },
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "enable_message_limit", .pSettingName = "enable_message_limit",
.type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT,
.valueCount = 1, .valueCount = 1,
.pValues = &setting_enable_message_limit, .pValues = &setting_enable_message_limit,
}, },
{ VkLayerSettingEXT {
.pLayerName = layer_name, .pLayerName = layer_name,
.pSettingName = "duplicate_message_limit", .pSettingName = "duplicate_message_limit",
.type = VK_LAYER_SETTING_TYPE_UINT32_EXT, .type = VK_LAYER_SETTING_TYPE_UINT32_EXT,

View file

@ -1,7 +1,6 @@
#pragma once #pragma once
#include <renderer/backend/vk/vulkan.hpp> #include <renderer/backend/vk/vulkan.hpp>
#include <vulkan/vk_enum_string_helper.h>
namespace lt::renderer::vk { namespace lt::renderer::vk {
@ -9,11 +8,9 @@ inline void vkc(VkResult result)
{ {
if (result) if (result)
{ {
throw std::runtime_error { std::format( throw std::runtime_error {
"Vulkan call failed with result: {}({})", std::format("Vulkan call failed with result: {}", std::to_underlying(result))
string_VkResult(result), };
std::to_underlying(result)
) };
} }
} }

View file

@ -7,7 +7,6 @@
#include <memory/scope.hpp> #include <memory/scope.hpp>
#include <renderer/api.hpp> #include <renderer/api.hpp>
#include <renderer/components/messenger.hpp> #include <renderer/components/messenger.hpp>
#include <renderer/frontend/renderer/renderer.hpp>
namespace lt::renderer { namespace lt::renderer {
@ -15,10 +14,10 @@ class System: public app::ISystem
{ {
public: public:
/** config.max_frames_in_flight should not be higher than this value. */ /** config.max_frames_in_flight should not be higher than this value. */
static constexpr auto frames_in_flight_upper_limit = IRenderer::frames_in_flight_upper_limit; static constexpr auto frames_in_flight_upper_limit = 5u;
/** config.max_frames_in_flight should not be lower than this value. */ /** config.max_frames_in_flight should not be lower than this value. */
static constexpr auto frames_in_flight_lower_limit = IRenderer::frames_in_flight_lower_limit; static constexpr auto frames_in_flight_lower_limit = 1u;
struct Configuration struct Configuration
{ {