From b10979c67bf9a2c49f46e01873a2cac1e44bc97a Mon Sep 17 00:00:00 2001 From: assiduous Date: Sun, 2 Aug 2020 22:38:31 -0700 Subject: Few more updated to render pass desc validation --- Graphics/GraphicsEngine/src/RenderPassBase.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/src/RenderPassBase.cpp b/Graphics/GraphicsEngine/src/RenderPassBase.cpp index 683d86aa..a0548e4d 100644 --- a/Graphics/GraphicsEngine/src/RenderPassBase.cpp +++ b/Graphics/GraphicsEngine/src/RenderPassBase.cpp @@ -87,7 +87,9 @@ void ValidateRenderPassDesc(const RenderPassDesc& Desc) Attachment.InitialState != RESOURCE_STATE_UNORDERED_ACCESS && Attachment.InitialState != RESOURCE_STATE_SHADER_RESOURCE && Attachment.InitialState != RESOURCE_STATE_RESOLVE_DEST && - Attachment.InitialState != RESOURCE_STATE_RESOLVE_SOURCE) + Attachment.InitialState != RESOURCE_STATE_RESOLVE_SOURCE && + Attachment.InitialState != RESOURCE_STATE_COPY_DEST && + Attachment.InitialState != RESOURCE_STATE_COPY_SOURCE) { LOG_RENDER_PASS_ERROR_AND_THROW("the initial state of depth-stencil attachment ", i, " (", GetResourceStateString(Attachment.InitialState), ") is invalid."); } @@ -97,7 +99,9 @@ void ValidateRenderPassDesc(const RenderPassDesc& Desc) Attachment.FinalState != RESOURCE_STATE_UNORDERED_ACCESS && Attachment.FinalState != RESOURCE_STATE_SHADER_RESOURCE && Attachment.FinalState != RESOURCE_STATE_RESOLVE_DEST && - Attachment.FinalState != RESOURCE_STATE_RESOLVE_SOURCE) + Attachment.FinalState != RESOURCE_STATE_RESOLVE_SOURCE && + Attachment.FinalState != RESOURCE_STATE_COPY_DEST && + Attachment.FinalState != RESOURCE_STATE_COPY_SOURCE) { LOG_RENDER_PASS_ERROR_AND_THROW("the final state of depth-stencil attachment ", i, " (", GetResourceStateString(Attachment.FinalState), ") is invalid."); } @@ -108,7 +112,9 @@ void ValidateRenderPassDesc(const RenderPassDesc& Desc) Attachment.InitialState != RESOURCE_STATE_UNORDERED_ACCESS && Attachment.InitialState != RESOURCE_STATE_SHADER_RESOURCE && Attachment.InitialState != RESOURCE_STATE_RESOLVE_DEST && - Attachment.InitialState != RESOURCE_STATE_RESOLVE_SOURCE) + Attachment.InitialState != RESOURCE_STATE_RESOLVE_SOURCE && + Attachment.InitialState != RESOURCE_STATE_COPY_SOURCE && + Attachment.InitialState != RESOURCE_STATE_PRESENT) { LOG_RENDER_PASS_ERROR_AND_THROW("the initial state of color attachment ", i, " (", GetResourceStateString(Attachment.InitialState), ") is invalid."); } @@ -117,7 +123,9 @@ void ValidateRenderPassDesc(const RenderPassDesc& Desc) Attachment.FinalState != RESOURCE_STATE_UNORDERED_ACCESS && Attachment.FinalState != RESOURCE_STATE_SHADER_RESOURCE && Attachment.FinalState != RESOURCE_STATE_RESOLVE_DEST && - Attachment.FinalState != RESOURCE_STATE_RESOLVE_SOURCE) + Attachment.FinalState != RESOURCE_STATE_RESOLVE_SOURCE && + Attachment.FinalState != RESOURCE_STATE_COPY_SOURCE && + Attachment.FinalState != RESOURCE_STATE_PRESENT) { LOG_RENDER_PASS_ERROR_AND_THROW("the final state of color attachment ", i, " (", GetResourceStateString(Attachment.FinalState), ") is invalid."); } -- cgit v1.2.3