diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-08-19 16:04:49 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-08-19 16:04:49 +0000 |
| commit | 24598081aa13231ab80bf7e62476855bf4e177cd (patch) | |
| tree | 3f7d8b7324f5390014dbb9d518f63ad42bd0c4d3 /Graphics/GraphicsEngineVulkan | |
| parent | Cache pointers to ID3D12GraphicsCommandList6 and ID3D12Device2 (diff) | |
| download | DiligentCore-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.cpp | 14 |
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 = {}; |
