diff --git a/destrum/src/Graphics/GfxDevice.cpp b/destrum/src/Graphics/GfxDevice.cpp index 84ef7f2..07d6acd 100644 --- a/destrum/src/Graphics/GfxDevice.cpp +++ b/destrum/src/Graphics/GfxDevice.cpp @@ -65,7 +65,11 @@ void GfxDevice::init(SDL_Window* window, const std::string& appName, bool vSync) .synchronization2 = true, .dynamicRendering = true, }; - + const auto extendedDynamicState3Features = + VkPhysicalDeviceExtendedDynamicState3FeaturesEXT{ + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_EXTENDED_DYNAMIC_STATE_3_FEATURES_EXT, + .extendedDynamicState3PolygonMode = VK_TRUE, + }; physicalDevice = vkb::PhysicalDeviceSelector{instance} .set_minimum_version(1, 3) @@ -73,6 +77,7 @@ void GfxDevice::init(SDL_Window* window, const std::string& appName, bool vSync) .set_required_features_12(features12) .set_required_features_13(features13) .add_required_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME) + .add_required_extension_features(extendedDynamicState3Features) .set_surface(surface) .prefer_gpu_device_type(vkb::PreferredDeviceType::discrete) .select() diff --git a/destrum/src/Graphics/Swapchain.cpp b/destrum/src/Graphics/Swapchain.cpp index d127ddd..43f8ebc 100644 --- a/destrum/src/Graphics/Swapchain.cpp +++ b/destrum/src/Graphics/Swapchain.cpp @@ -5,7 +5,6 @@ #include #include -#include #include "volk.h" @@ -39,10 +38,10 @@ void Swapchain::createSwapchain(GfxDevice* gfxDevice, VkFormat format, std::uint .set_desired_extent(width, height) .build(); if (!res.has_value()) { - throw std::runtime_error(std::format( - "failed to create swapchain: error = {}, vk result = {}", - res.full_error().type.message(), - string_VkResult(res.full_error().vk_result))); + // throw std::runtime_error(std::format( + // "failed to create swapchain: error = {}, vk result = {}", + // res.full_error().type.message(), + // string_VkResult(res.full_error().vk_result))); } m_swapchain = res.value(); @@ -96,10 +95,10 @@ void Swapchain::recreateSwapchain( .build(); if (!res.has_value()) { - throw std::runtime_error(std::format( - "failed to create swapchain: error = {}, vk result = {}", - res.full_error().type.message(), - string_VkResult(res.full_error().vk_result))); + // throw std::runtime_error(std::format( + // "failed to create swapchain: error = {}, vk result = {}", + // res.full_error().type.message(), + // string_VkResult(res.full_error().vk_result))); } for (auto sem : imageRenderSemaphores) {