]> git.tdb.fi Git - libs/gui.git/commitdiff
Add flag for tessellation shaders in Vulkan context
authorMikko Rasa <tdb@tdb.fi>
Thu, 1 Sep 2022 19:46:47 +0000 (22:46 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 1 Sep 2022 19:46:47 +0000 (22:46 +0300)
source/graphics/vkxlib/vulkancontext.cpp
source/graphics/vulkancontext.h

index ccd9a1eed7f73f002d8a2d81e7c489b2a448e062..f25349974c8adfd3d47b1bb44ad5a1a9737d2b4f 100644 (file)
@@ -64,7 +64,8 @@ string vulkan_error::get_error_message(unsigned code)
 VulkanOptions::VulkanOptions():
        enable_validation(false),
        enable_debug_report(false),
 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);
 
                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;
 
                VkDeviceCreateInfo device_create_info = { };
                device_create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
index f80f5cb5ddc4363daed3ddc354bd0eb7a50a0abc..666a2b06daafdca22d4467efa5d38d857ef155d6 100644 (file)
@@ -25,6 +25,7 @@ struct VulkanOptions
        bool enable_validation;
        bool enable_debug_report;
        bool enable_geometry_shader;
        bool enable_validation;
        bool enable_debug_report;
        bool enable_geometry_shader;
+       bool enable_tessellation_shader;
 
        VulkanOptions();
 };
 
        VulkanOptions();
 };