summaryrefslogtreecommitdiffstats
path: root/tools/gfx/d3d11/d3d11-resource-views.h
blob: 1ce385f200f04e916690d8b59ca461f650bbe376 (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
// d3d11-resource-views.h
#pragma once

#include "d3d11-base.h"

namespace gfx
{

using namespace Slang;

namespace d3d11
{

class ResourceViewImpl : public ResourceViewBase
{
public:
    enum class Type
    {
        SRV,
        UAV,
        DSV,
        RTV,
    };
    Type m_type;
};

class ShaderResourceViewImpl : public ResourceViewImpl
{
public:
    ComPtr<ID3D11ShaderResourceView> m_srv;
};

class UnorderedAccessViewImpl : public ResourceViewImpl
{
public:
    ComPtr<ID3D11UnorderedAccessView> m_uav;
};

class DepthStencilViewImpl : public ResourceViewImpl
{
public:
    ComPtr<ID3D11DepthStencilView> m_dsv;
    DepthStencilClearValue m_clearValue;
};

class RenderTargetViewImpl : public ResourceViewImpl
{
public:
    ComPtr<ID3D11RenderTargetView> m_rtv;
    float m_clearValue[4];
};

} // namespace d3d11
} // namespace gfx