Skip to content
Snippets Groups Projects
Verified Commit b022602d authored by Tobias Frisch's avatar Tobias Frisch
Browse files

Add support for shader termination via discard

parent 796b521d
No related branches found
No related tags found
No related merge requests found
......@@ -354,6 +354,16 @@ namespace vkcv {
*/
[[nodiscard]] bool checkSupport(const vk::PhysicalDeviceIndexTypeUint8FeaturesEXT &features,
bool required) const;
/**
* @brief Checks support of the @p vk::PhysicalDeviceShaderTerminateInvocationFeatures.
*
* @param[in] features The features
* @param[in] required True, if the @p features are required, else false
* @return @p True, if the @p features are supported, else @p false
*/
[[nodiscard]] bool checkSupport(const vk::PhysicalDeviceShaderTerminateInvocationFeatures &features,
bool required) const;
/**
* @brief Searches for a base structure of a given structure type.
......
......@@ -504,6 +504,15 @@ namespace vkcv {
return true;
}
bool FeatureManager::checkSupport(const vk::PhysicalDeviceShaderTerminateInvocationFeatures &features,
bool required) const {
vkcv_check_init_features2(vk::PhysicalDeviceShaderTerminateInvocationFeatures);
vkcv_check_feature(shaderTerminateInvocation);
return true;
}
vk::BaseOutStructure* FeatureManager::findFeatureStructure(vk::StructureType type) const {
for (auto &base : m_featuresExtensions) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment