summaryrefslogtreecommitdiffstats
path: root/tools/gfx/debug-layer/debug-base.h
blob: c235102c400261fa2a88f553f96810cfe97dfcb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// debug-base.h
#pragma once

#include "../command-encoder-com-forward.h"
#include "../renderer-shared.h"
#include "core/slang-com-object.h"
#include "slang-com-ptr.h"
#include "slang-gfx.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<typename TInterface>
class DebugObject : public TInterface, public DebugObjectBase
{
public:
    Slang::ComPtr<TInterface> baseObject;
};

template<typename TInterface>
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