fuck vk_enum_helper / fix device features
This commit is contained in:
@@ -65,7 +65,11 @@ void GfxDevice::init(SDL_Window* window, const std::string& appName, bool vSync)
|
|||||||
.synchronization2 = true,
|
.synchronization2 = true,
|
||||||
.dynamicRendering = 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}
|
physicalDevice = vkb::PhysicalDeviceSelector{instance}
|
||||||
.set_minimum_version(1, 3)
|
.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_12(features12)
|
||||||
.set_required_features_13(features13)
|
.set_required_features_13(features13)
|
||||||
.add_required_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME)
|
.add_required_extension(VK_EXT_EXTENDED_DYNAMIC_STATE_3_EXTENSION_NAME)
|
||||||
|
.add_required_extension_features(extendedDynamicState3Features)
|
||||||
.set_surface(surface)
|
.set_surface(surface)
|
||||||
.prefer_gpu_device_type(vkb::PreferredDeviceType::discrete)
|
.prefer_gpu_device_type(vkb::PreferredDeviceType::discrete)
|
||||||
.select()
|
.select()
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include <destrum/Graphics/GfxDevice.h>
|
#include <destrum/Graphics/GfxDevice.h>
|
||||||
#include <destrum/Graphics/Init.h>
|
#include <destrum/Graphics/Init.h>
|
||||||
|
|
||||||
#include <vulkan/vk_enum_string_helper.h>
|
|
||||||
#include "volk.h"
|
#include "volk.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -39,10 +38,10 @@ void Swapchain::createSwapchain(GfxDevice* gfxDevice, VkFormat format, std::uint
|
|||||||
.set_desired_extent(width, height)
|
.set_desired_extent(width, height)
|
||||||
.build();
|
.build();
|
||||||
if (!res.has_value()) {
|
if (!res.has_value()) {
|
||||||
throw std::runtime_error(std::format(
|
// throw std::runtime_error(std::format(
|
||||||
"failed to create swapchain: error = {}, vk result = {}",
|
// "failed to create swapchain: error = {}, vk result = {}",
|
||||||
res.full_error().type.message(),
|
// res.full_error().type.message(),
|
||||||
string_VkResult(res.full_error().vk_result)));
|
// string_VkResult(res.full_error().vk_result)));
|
||||||
}
|
}
|
||||||
m_swapchain = res.value();
|
m_swapchain = res.value();
|
||||||
|
|
||||||
@@ -96,10 +95,10 @@ void Swapchain::recreateSwapchain(
|
|||||||
.build();
|
.build();
|
||||||
|
|
||||||
if (!res.has_value()) {
|
if (!res.has_value()) {
|
||||||
throw std::runtime_error(std::format(
|
// throw std::runtime_error(std::format(
|
||||||
"failed to create swapchain: error = {}, vk result = {}",
|
// "failed to create swapchain: error = {}, vk result = {}",
|
||||||
res.full_error().type.message(),
|
// res.full_error().type.message(),
|
||||||
string_VkResult(res.full_error().vk_result)));
|
// string_VkResult(res.full_error().vk_result)));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto sem : imageRenderSemaphores) {
|
for (auto sem : imageRenderSemaphores) {
|
||||||
|
|||||||
Reference in New Issue
Block a user