diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-08-19 14:47:39 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-08-19 14:47:39 +0000 |
| commit | c7c51b0f61b9427ed9cf56c163ee451fdda0ff02 (patch) | |
| tree | 613255cd5020831d3c96be0fd06ce6b8a88ec35b /Graphics/GraphicsEngine | |
| parent | Added mesh shader (diff) | |
| download | DiligentCore-c7c51b0f61b9427ed9cf56c163ee451fdda0ff02.tar.gz DiligentCore-c7c51b0f61b9427ed9cf56c163ee451fdda0ff02.zip | |
formatting
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/include/DeviceContextBase.hpp | 12 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/include/PipelineStateBase.hpp | 5 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Graphics/GraphicsEngine/include/DeviceContextBase.hpp b/Graphics/GraphicsEngine/include/DeviceContextBase.hpp index d547ca6f..f710126e 100644 --- a/Graphics/GraphicsEngine/include/DeviceContextBase.hpp +++ b/Graphics/GraphicsEngine/include/DeviceContextBase.hpp @@ -1205,7 +1205,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: LOG_ERROR_MESSAGE("DrawIndexed command arguments are invalid: no pipeline state is bound."); return false; } - + if (m_pPipelineState->GetDesc().PipelineType != GRAPHICS_PIPELINE) { LOG_ERROR_MESSAGE("DrawIndexed command arguments are invalid: pipeline state '", @@ -1236,7 +1236,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: template <typename BaseInterface, typename ImplementationTraits> inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: - DvpVerifyDrawMeshArguments(const DrawMeshAttribs& Attribs)const + DvpVerifyDrawMeshArguments(const DrawMeshAttribs& Attribs) const { if ((Attribs.Flags & DRAW_FLAG_VERIFY_DRAW_ATTRIBS) == 0) return true; @@ -1274,7 +1274,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: LOG_ERROR_MESSAGE("DrawIndirect command arguments are invalid: no pipeline state is bound."); return false; } - + if (m_pPipelineState->GetDesc().PipelineType != GRAPHICS_PIPELINE) { @@ -1313,7 +1313,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: LOG_ERROR_MESSAGE("DrawIndexedIndirect command arguments are invalid: no pipeline state is bound."); return false; } - + if (m_pPipelineState->GetDesc().PipelineType != GRAPHICS_PIPELINE) { LOG_ERROR_MESSAGE("DrawIndexedIndirect command arguments are invalid: pipeline state '", @@ -1358,7 +1358,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: { if ((Attribs.Flags & DRAW_FLAG_VERIFY_DRAW_ATTRIBS) == 0) return true; - + if (!m_pPipelineState) { LOG_ERROR_MESSAGE("DrawMeshIndirect command arguments are invalid: no pipeline state is bound."); @@ -1482,7 +1482,7 @@ inline bool DeviceContextBase<BaseInterface, ImplementationTraits>:: LOG_ERROR_MESSAGE("DispatchComputeIndirect command arguments are invalid: no pipeline state is bound."); return false; } - + if (m_pPipelineState->GetDesc().PipelineType != COMPUTE_PIPELINE) { LOG_ERROR_MESSAGE("DispatchComputeIndirect command arguments are invalid: pipeline state '", diff --git a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp index 37d4e7cd..6308c1e4 100644 --- a/Graphics/GraphicsEngine/include/PipelineStateBase.hpp +++ b/Graphics/GraphicsEngine/include/PipelineStateBase.hpp @@ -185,8 +185,7 @@ public: m_pDS = GraphicsPipeline.pDS; m_pHS = GraphicsPipeline.pHS; } - else - if (PSODesc.PipelineType == MESH_PIPELINE) + else if (PSODesc.PipelineType == MESH_PIPELINE) { CHECK_THROW(GraphicsPipeline.pMS, "Mesh shader must be defined"); CHECK_THROW(!GraphicsPipeline.pVS && !GraphicsPipeline.pGS && !GraphicsPipeline.pDS && !GraphicsPipeline.pHS, @@ -204,7 +203,7 @@ public: if (GraphicsPipeline.pDS) m_ppShaders[m_NumShaders++] = GraphicsPipeline.pDS; if (GraphicsPipeline.pAS) m_ppShaders[m_NumShaders++] = GraphicsPipeline.pAS; if (GraphicsPipeline.pMS) m_ppShaders[m_NumShaders++] = GraphicsPipeline.pMS; - + DEV_CHECK_ERR(m_NumShaders > 0, "There must be at least one shader in the Pipeline State"); for (Uint32 rt = GraphicsPipeline.NumRenderTargets; rt < _countof(GraphicsPipeline.RTVFormats); ++rt) |
