summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorazhirnov <zh1dron@gmail.com>2020-08-19 16:04:49 +0000
committerazhirnov <zh1dron@gmail.com>2020-08-19 16:04:49 +0000
commit24598081aa13231ab80bf7e62476855bf4e177cd (patch)
tree3f7d8b7324f5390014dbb9d518f63ad42bd0c4d3 /Graphics/GraphicsEngineVulkan
parentCache pointers to ID3D12GraphicsCommandList6 and ID3D12Device2 (diff)
downloadDiligentCore-24598081aa13231ab80bf7e62476855bf4e177cd.tar.gz
DiligentCore-24598081aa13231ab80bf7e62476855bf4e177cd.zip
Added root signature for DrawMeshIndirect, added some checks
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
index b7100012..65150c48 100644
--- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
+++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp
@@ -342,8 +342,20 @@ PipelineStateVkImpl::PipelineStateVkImpl(IReferenceCounters* pRefCoun
TessStateCI.flags = 0; // reserved for future use
PipelineCI.pTessellationState = &TessStateCI;
- PrimitiveTopology_To_VkPrimitiveTopologyAndPatchCPCount(GraphicsPipeline.PrimitiveTopology, InputAssemblyCI.topology, TessStateCI.patchControlPoints);
+ if (m_Desc.PipelineType == PIPELINE_TYPE_MESH)
+ {
+ // Input assembly doesn't used during mesh pipeline creation, so topology may contain any value.
+ // Validation layers may generate warning if used point_list topology, so set another value.
+ InputAssemblyCI.topology = VK_PRIMITIVE_TOPOLOGY_MAX_ENUM;
+ // Vertex input state and tessellation state are ignored in mesh pipeline and shuld be null.
+ PipelineCI.pVertexInputState = nullptr;
+ PipelineCI.pTessellationState = nullptr;
+ }
+ else
+ {
+ PrimitiveTopology_To_VkPrimitiveTopologyAndPatchCPCount(GraphicsPipeline.PrimitiveTopology, InputAssemblyCI.topology, TessStateCI.patchControlPoints);
+ }
VkPipelineViewportStateCreateInfo ViewPortStateCI = {};