From 0c99ee543ef936ef770f4b11fa77e08c2f736c1b Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 6 Jan 2020 20:53:34 -0800 Subject: Improved device feature reporting; added flags for query support --- .../src/RenderDeviceVkImpl.cpp | 28 +++++++++++++++------- 1 file changed, 19 insertions(+), 9 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp index 8b6c93da..b1daf423 100644 --- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp @@ -147,18 +147,28 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters* } // clang-format on { - m_DeviceCaps.DevType = DeviceType::Vulkan; - m_DeviceCaps.MajorVersion = 1; - m_DeviceCaps.MinorVersion = 0; - m_DeviceCaps.AdaterType = ADAPTER_TYPE_HARDWARE; - m_DeviceCaps.bSeparableProgramSupported = True; - m_DeviceCaps.bMultithreadedResourceCreationSupported = True; + m_DeviceCaps.DevType = DeviceType::Vulkan; + m_DeviceCaps.MajorVersion = 1; + m_DeviceCaps.MinorVersion = 0; + m_DeviceCaps.AdaterType = ADAPTER_TYPE_HARDWARE; for (Uint32 fmt = 1; fmt < m_TextureFormatsInfo.size(); ++fmt) m_TextureFormatsInfo[fmt].Supported = true; // We will test every format on a specific hardware device - m_DeviceCaps.bGeometryShadersSupported = EngineCI.EnabledFeatures.geometryShader; - m_DeviceCaps.bTessellationSupported = EngineCI.EnabledFeatures.tessellationShader; - m_DeviceCaps.bBindlessSupported = True; + auto& Features = m_DeviceCaps.Features; + const auto& vkDeviceFeatures = m_PhysicalDevice->GetFeatures(); + + Features.SeparablePrograms = True; + Features.IndirectRendering = True; + Features.WireframeFill = True; + Features.MultithreadedResourceCreation = True; + Features.ComputeShaders = True; + Features.GeometryShaders = vkDeviceFeatures.geometryShader != VK_FALSE; + Features.Tessellation = vkDeviceFeatures.tessellationShader != VK_FALSE; + Features.BindlessResources = True; + Features.OcclusionQueries = vkDeviceFeatures.occlusionQueryPrecise != VK_FALSE; + Features.BinaryOcclusionQueries = True; + Features.TimestampQueries = True; + Features.PipelineStatisticsQueries = vkDeviceFeatures.pipelineStatisticsQuery != VK_FALSE; } RenderDeviceVkImpl::~RenderDeviceVkImpl() -- cgit v1.2.3