From 81811351b82362463776023cad23e120c6d4d391 Mon Sep 17 00:00:00 2001 From: light7734 Date: Wed, 8 Oct 2025 06:29:20 +0330 Subject: [PATCH] fix(renderer): compilation issues on gcc --- .../private/backend/vk/context/instance.cpp | 14 +++++++------- modules/renderer/private/backend/vk/utils.hpp | 9 +++------ modules/renderer/public/system.hpp | 5 ++--- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/modules/renderer/private/backend/vk/context/instance.cpp b/modules/renderer/private/backend/vk/context/instance.cpp index c91754e..538f7f0 100644 --- a/modules/renderer/private/backend/vk/context/instance.cpp +++ b/modules/renderer/private/backend/vk/context/instance.cpp @@ -140,49 +140,49 @@ void Instance::initialize_instance() }; const auto settings = std::array({ - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "validate_core", .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .valueCount = 1, .pValues = &setting_validate_core, }, - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "validate_sync", .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .valueCount = 1, .pValues = &setting_validate_sync, }, - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "thread_safety", .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .valueCount = 1, .pValues = &setting_thread_safety, }, - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "debug_action", .type = VK_LAYER_SETTING_TYPE_STRING_EXT, .valueCount = 1, .pValues = static_cast(&setting_debug_action), }, - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "report_flags", .type = VK_LAYER_SETTING_TYPE_STRING_EXT, .valueCount = setting_report_flags.size(), .pValues = static_cast(setting_report_flags.data()), }, - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "enable_message_limit", .type = VK_LAYER_SETTING_TYPE_BOOL32_EXT, .valueCount = 1, .pValues = &setting_enable_message_limit, }, - { + VkLayerSettingEXT { .pLayerName = layer_name, .pSettingName = "duplicate_message_limit", .type = VK_LAYER_SETTING_TYPE_UINT32_EXT, diff --git a/modules/renderer/private/backend/vk/utils.hpp b/modules/renderer/private/backend/vk/utils.hpp index 3ce9618..0a20be4 100644 --- a/modules/renderer/private/backend/vk/utils.hpp +++ b/modules/renderer/private/backend/vk/utils.hpp @@ -1,7 +1,6 @@ #pragma once #include -#include namespace lt::renderer::vk { @@ -9,11 +8,9 @@ inline void vkc(VkResult result) { if (result) { - throw std::runtime_error { std::format( - "Vulkan call failed with result: {}({})", - string_VkResult(result), - std::to_underlying(result) - ) }; + throw std::runtime_error { + std::format("Vulkan call failed with result: {}", std::to_underlying(result)) + }; } } diff --git a/modules/renderer/public/system.hpp b/modules/renderer/public/system.hpp index 54f33de..9ad20c0 100644 --- a/modules/renderer/public/system.hpp +++ b/modules/renderer/public/system.hpp @@ -7,7 +7,6 @@ #include #include #include -#include namespace lt::renderer { @@ -15,10 +14,10 @@ class System: public app::ISystem { public: /** 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. */ - 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 {