From 2a6d4fa2ba9ebbf6297d04a9ab6a5943c79448fc Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 2 Mar 2019 09:02:55 +0100 Subject: [PATCH] [dxvk] Implement DxvkDevice::getShaderPipelineStages --- src/dxvk/dxvk_device.cpp | 17 +++++++++++++++++ src/dxvk/dxvk_device.h | 6 ++++++ 2 files changed, 23 insertions(+) diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index 8580709e..e0704313 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -46,6 +46,23 @@ namespace dxvk { } + VkPipelineStageFlags DxvkDevice::getShaderPipelineStages() const { + VkPipelineStageFlags result = VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT + | VK_PIPELINE_STAGE_VERTEX_SHADER_BIT + | VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT; + + if (m_features.core.features.geometryShader) + result |= VK_PIPELINE_STAGE_GEOMETRY_SHADER_BIT; + + if (m_features.core.features.tessellationShader) { + result |= VK_PIPELINE_STAGE_TESSELLATION_CONTROL_SHADER_BIT + | VK_PIPELINE_STAGE_TESSELLATION_EVALUATION_SHADER_BIT; + } + + return result; + } + + DxvkDeviceOptions DxvkDevice::options() const { DxvkDeviceOptions options; options.maxNumDynamicUniformBuffers = m_properties.limits.maxDescriptorSetUniformBuffersDynamic; diff --git a/src/dxvk/dxvk_device.h b/src/dxvk/dxvk_device.h index ae08bf57..1f867c28 100644 --- a/src/dxvk/dxvk_device.h +++ b/src/dxvk/dxvk_device.h @@ -141,6 +141,12 @@ namespace dxvk { const DxvkDeviceFeatures& features() const { return m_features; } + + /** + * \brief Queries supported shader stages + * \returns Supported shader pipeline stages + */ + VkPipelineStageFlags getShaderPipelineStages() const; /** * \brief Retrieves device options