From fc345700e4d49b85e6d1029e8a0f5f442bc5280d Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 1 Sep 2022 22:46:47 +0300 Subject: [PATCH] Add flag for tessellation shaders in Vulkan context --- source/graphics/vkxlib/vulkancontext.cpp | 4 +++- source/graphics/vulkancontext.h | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/graphics/vkxlib/vulkancontext.cpp b/source/graphics/vkxlib/vulkancontext.cpp index ccd9a1e..f253499 100644 --- a/source/graphics/vkxlib/vulkancontext.cpp +++ b/source/graphics/vkxlib/vulkancontext.cpp @@ -64,7 +64,8 @@ string vulkan_error::get_error_message(unsigned code) VulkanOptions::VulkanOptions(): enable_validation(false), enable_debug_report(false), - enable_geometry_shader(false) + enable_geometry_shader(false), + enable_tessellation_shader(false) { } @@ -200,6 +201,7 @@ void VulkanContext::platform_init(const VulkanOptions &opts) VkPhysicalDeviceFeatures features = { }; features.geometryShader = (opts.enable_geometry_shader ? VK_TRUE : VK_FALSE); + features.tessellationShader = (opts.enable_tessellation_shader ? VK_TRUE : VK_FALSE); VkDeviceCreateInfo device_create_info = { }; device_create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO; diff --git a/source/graphics/vulkancontext.h b/source/graphics/vulkancontext.h index f80f5cb..666a2b0 100644 --- a/source/graphics/vulkancontext.h +++ b/source/graphics/vulkancontext.h @@ -25,6 +25,7 @@ struct VulkanOptions bool enable_validation; bool enable_debug_report; bool enable_geometry_shader; + bool enable_tessellation_shader; VulkanOptions(); }; -- 2.45.2