From 24598081aa13231ab80bf7e62476855bf4e177cd Mon Sep 17 00:00:00 2001 From: azhirnov Date: Wed, 19 Aug 2020 19:04:49 +0300 Subject: Added root signature for DrawMeshIndirect, added some checks --- Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Graphics/GraphicsEngineVulkan') 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 = {}; -- cgit v1.2.3