summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
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/GraphicsEngine
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/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/PipelineStateBase.hpp3
-rw-r--r--Graphics/GraphicsEngine/include/ShaderBase.hpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
index 82d89e0d..5add92c4 100644
--- a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
+++ b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp
@@ -193,6 +193,9 @@ public:
CHECK_THROW(!GraphicsPipeline.pVS && !GraphicsPipeline.pGS && !GraphicsPipeline.pDS && !GraphicsPipeline.pHS,
"Vertex, geometry and tessellation shaders are not supported in mesh pipeline");
DEV_CHECK_ERR(GraphicsPipeline.InputLayout.NumElements == 0, "Input layout ignored in mesh shader");
+ DEV_CHECK_ERR(GraphicsPipeline.PrimitiveTopology == PRIMITIVE_TOPOLOGY_TRIANGLE_LIST ||
+ GraphicsPipeline.PrimitiveTopology == PRIMITIVE_TOPOLOGY_UNDEFINED,
+ "Primitive topology ignored in mesh pipeline, set it to undefined or keep default value (triangle list)");
m_pAS = GraphicsPipeline.pAS;
m_pMS = GraphicsPipeline.pMS;
m_pPS = GraphicsPipeline.pPS;
diff --git a/Graphics/GraphicsEngine/include/ShaderBase.hpp b/Graphics/GraphicsEngine/include/ShaderBase.hpp
index 5462c7a4..f3d3f6cc 100644
--- a/Graphics/GraphicsEngine/include/ShaderBase.hpp
+++ b/Graphics/GraphicsEngine/include/ShaderBase.hpp
@@ -118,6 +118,9 @@ public:
if (ShdrDesc.ShaderType == SHADER_TYPE_COMPUTE && !deviceFeatures.ComputeShaders)
LOG_ERROR_AND_THROW("Compute shaders are not supported by this device");
+
+ if ((ShdrDesc.ShaderType == SHADER_TYPE_AMPLIFICATION || ShdrDesc.ShaderType == SHADER_TYPE_MESH) && !deviceFeatures.MeshShaders)
+ LOG_ERROR_AND_THROW("Mesh shaders are not supported by this device");
}
IMPLEMENT_QUERY_INTERFACE_IN_PLACE(IID_Shader, TDeviceObjectBase)