From c7c51b0f61b9427ed9cf56c163ee451fdda0ff02 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Wed, 19 Aug 2020 17:47:39 +0300 Subject: formatting --- Graphics/GraphicsEngine/include/DeviceContextBase.hpp | 12 ++++++------ Graphics/GraphicsEngine/include/PipelineStateBase.hpp | 5 ++--- 2 files changed, 8 insertions(+), 9 deletions(-) (limited to 'Graphics/GraphicsEngine') 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:: 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:: template inline bool DeviceContextBase:: - 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:: 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:: 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:: { 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:: 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) -- cgit v1.2.3