summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-01-07 17:14:11 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-01-07 17:14:11 +0000
commitf92524a49f7397c26b10109b1cad1cfede7095ff (patch)
treefb03eb91d3325a4464ea18adfec15b7cac19bfc5 /Graphics/GraphicsEngineVulkan
parentVulkan backend: fixed issues with occlusion and pipeline stats queries if the... (diff)
downloadDiligentCore-f92524a49f7397c26b10109b1cad1cfede7095ff.tar.gz
DiligentCore-f92524a49f7397c26b10109b1cad1cfede7095ff.zip
Improved reporting of device capabilities (fixed https://github.com/DiligentGraphics/DiligentCore/issues/109)
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp16
-rw-r--r--Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp23
2 files changed, 31 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp
index 24e0c614..963c9a72 100644
--- a/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/EngineFactoryVk.cpp
@@ -181,23 +181,25 @@ void EngineFactoryVkImpl::CreateDeviceAndContextsVk(const EngineVkCreateInfo& _E
}
ENABLE_FEATURE(depthBiasClamp)
- ENABLE_FEATURE(fillModeNonSolid)
ENABLE_FEATURE(depthClamp)
ENABLE_FEATURE(independentBlend)
- ENABLE_FEATURE(samplerAnisotropy)
- ENABLE_FEATURE(geometryShader)
- ENABLE_FEATURE(tessellationShader)
ENABLE_FEATURE(dualSrcBlend)
ENABLE_FEATURE(multiViewport)
- ENABLE_FEATURE(imageCubeArray)
ENABLE_FEATURE(textureCompressionBC)
ENABLE_FEATURE(vertexPipelineStoresAndAtomics)
ENABLE_FEATURE(fragmentStoresAndAtomics)
ENABLE_FEATURE(shaderStorageImageExtendedFormats)
#undef ENABLE_FEATURE
- DeviceFeatures.pipelineStatisticsQuery = PhysicalDeviceFeatures.pipelineStatisticsQuery;
- DeviceFeatures.occlusionQueryPrecise = PhysicalDeviceFeatures.occlusionQueryPrecise;
+#define ENABLE_FEATURE(Feature) DeviceFeatures.Feature = PhysicalDeviceFeatures.Feature
+ ENABLE_FEATURE(geometryShader);
+ ENABLE_FEATURE(tessellationShader);
+ ENABLE_FEATURE(pipelineStatisticsQuery);
+ ENABLE_FEATURE(occlusionQueryPrecise);
+ ENABLE_FEATURE(imageCubeArray);
+ ENABLE_FEATURE(fillModeNonSolid);
+ ENABLE_FEATURE(samplerAnisotropy);
+#undef ENABLE_FEATURE
DeviceCreateInfo.pEnabledFeatures = &DeviceFeatures; // NULL or a pointer to a VkPhysicalDeviceFeatures structure that contains
// boolean indicators of all the features to be enabled.
diff --git a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
index b1daf423..e3c3ebe5 100644
--- a/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/RenderDeviceVkImpl.cpp
@@ -159,7 +159,7 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
Features.SeparablePrograms = True;
Features.IndirectRendering = True;
- Features.WireframeFill = True;
+ Features.WireframeFill = vkDeviceFeatures.fillModeNonSolid != VK_FALSE;
Features.MultithreadedResourceCreation = True;
Features.ComputeShaders = True;
Features.GeometryShaders = vkDeviceFeatures.geometryShader != VK_FALSE;
@@ -169,6 +169,27 @@ RenderDeviceVkImpl::RenderDeviceVkImpl(IReferenceCounters*
Features.BinaryOcclusionQueries = True;
Features.TimestampQueries = True;
Features.PipelineStatisticsQueries = vkDeviceFeatures.pipelineStatisticsQuery != VK_FALSE;
+
+ const auto& vkDeviceLimits = m_PhysicalDevice->GetProperties().limits;
+ auto& TexCaps = m_DeviceCaps.TexCaps;
+
+ TexCaps.MaxTexture1DDimension = vkDeviceLimits.maxImageDimension1D;
+ TexCaps.MaxTexture1DArraySlices = vkDeviceLimits.maxImageArrayLayers;
+ TexCaps.MaxTexture2DDimension = vkDeviceLimits.maxImageDimension2D;
+ TexCaps.MaxTexture2DArraySlices = vkDeviceLimits.maxImageArrayLayers;
+ TexCaps.MaxTexture3DDimension = vkDeviceLimits.maxImageDimension3D;
+ TexCaps.MaxTextureCubeDimension = vkDeviceLimits.maxImageDimensionCube;
+ TexCaps.Texture2DMSSupported = True;
+ TexCaps.Texture2DMSArraySupported = True;
+ TexCaps.TextureViewSupported = True;
+ TexCaps.CubemapArraysSupported = vkDeviceFeatures.imageCubeArray;
+
+
+ auto& SamCaps = m_DeviceCaps.SamCaps;
+
+ SamCaps.BorderSamplingModeSupported = True;
+ SamCaps.AnisotropicFilteringSupported = vkDeviceFeatures.samplerAnisotropy;
+ SamCaps.LODBiasSupported = True;
}
RenderDeviceVkImpl::~RenderDeviceVkImpl()