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-base.h | 74 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 tools/gfx/debug-layer/debug-base.h (limited to 'tools/gfx/debug-layer/debug-base.h') diff --git a/tools/gfx/debug-layer/debug-base.h b/tools/gfx/debug-layer/debug-base.h new file mode 100644 index 000000000..aa269cc7b --- /dev/null +++ b/tools/gfx/debug-layer/debug-base.h @@ -0,0 +1,74 @@ +// debug-base.h +#pragma once + +#include "slang-gfx.h" +#include "slang-com-ptr.h" +#include "core/slang-com-object.h" +#include "../command-encoder-com-forward.h" +#include "../renderer-shared.h" + +namespace gfx +{ +using namespace Slang; + +namespace debug +{ + + class DebugObjectBase : public Slang::ComObject + { + public: + uint64_t uid; + DebugObjectBase() + { + static uint64_t uidCounter = 0; + uid = ++uidCounter; + } + }; + + template + class DebugObject + : public TInterface + , public DebugObjectBase + { + public: + Slang::ComPtr baseObject; + }; + + template + class UnownedDebugObject + : public TInterface + , public DebugObjectBase + { + public: + TInterface* baseObject = nullptr; + }; + + class DebugDevice; + class DebugShaderTable; + class DebugQueryPool; + class DebugBufferResource; + class DebugTextureResource; + class DebugResourceView; + class DebugAccelerationStructure; + class DebugSamplerState; + class DebugShaderObject; + class DebugRootShaderObject; + class DebugCommandBuffer; + class DebugResourceCommandEncoderImpl; + class DebugComputeCommandEncoder; + class DebugResourceCommandEncoder; + class DebugRenderCommandEncoder; + class DebugRayTracingCommandEncoder; + class DebugFence; + class DebugCommandQueue; + class DebugFramebuffer; + class DebugFramebufferLayout; + class DebugInputLayout; + class DebugPipelineState; + class DebugRenderPassLayout; + class DebugShaderProgram; + class DebugTransientResourceHeap; + class DebugSwapchain; + +} // namespace debug +} // namespace gfx -- cgit v1.2.3