From 12a846e8facf090aaeb68fcabf55867f5eaed747 Mon Sep 17 00:00:00 2001 From: lucy96chen <47800040+lucy96chen@users.noreply.github.com> Date: Thu, 4 Aug 2022 16:59:28 -0700 Subject: Split debug-layer into smaller files (#2344) * checkpoint commit * debug-layer split, does not compile * Almost compiles, rebasing before making any further changes * everything compiles and passes tests locally * Added tools/gfx/debug-layer to premake and ran premake Co-authored-by: Yong He --- tools/gfx/debug-layer/debug-transient-heap.cpp | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 tools/gfx/debug-layer/debug-transient-heap.cpp (limited to 'tools/gfx/debug-layer/debug-transient-heap.cpp') diff --git a/tools/gfx/debug-layer/debug-transient-heap.cpp b/tools/gfx/debug-layer/debug-transient-heap.cpp new file mode 100644 index 000000000..91e575742 --- /dev/null +++ b/tools/gfx/debug-layer/debug-transient-heap.cpp @@ -0,0 +1,40 @@ +// debug-transient-heap.cpp +#include "debug-transient-heap.h" + +#include "debug-command-buffer.h" + +#include "debug-helper-functions.h" + +namespace gfx +{ +using namespace Slang; + +namespace debug +{ + +Result DebugTransientResourceHeap::synchronizeAndReset() +{ + SLANG_GFX_API_FUNC; + return baseObject->synchronizeAndReset(); +} + +Result DebugTransientResourceHeap::finish() +{ + SLANG_GFX_API_FUNC; + return baseObject->finish(); +} + +Result DebugTransientResourceHeap::createCommandBuffer(ICommandBuffer** outCommandBuffer) +{ + SLANG_GFX_API_FUNC; + RefPtr outObject = new DebugCommandBuffer(); + outObject->m_transientHeap = this; + auto result = baseObject->createCommandBuffer(outObject->baseObject.writeRef()); + if (SLANG_FAILED(result)) + return result; + returnComPtr(outCommandBuffer, outObject); + return result; +} + +} // namespace debug +} // namespace gfx -- cgit v1.2.3