summaryrefslogtreecommitdiffstats
path: root/tools/gfx/d3d11/d3d11-framebuffer.h
blob: b0b55901ad45ab93770cf5af9701dfec5633071e (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
// d3d11-framebuffer.h
#pragma once

#include "d3d11-base.h"

namespace gfx
{

using namespace Slang;

namespace d3d11
{

enum
{
    kMaxUAVs = 64,
    kMaxRTVs = 8,
};

class FramebufferLayoutImpl : public FramebufferLayoutBase
{
public:
    ShortList<IFramebufferLayout::TargetLayout> m_renderTargets;
    bool m_hasDepthStencil = false;
    IFramebufferLayout::TargetLayout m_depthStencil;
};

class FramebufferImpl : public FramebufferBase
{
public:
    ShortList<RefPtr<RenderTargetViewImpl>, kMaxRTVs> renderTargetViews;
    ShortList<ID3D11RenderTargetView*, kMaxRTVs> d3dRenderTargetViews;
    RefPtr<DepthStencilViewImpl> depthStencilView;
    ID3D11DepthStencilView* d3dDepthStencilView;
};

} // namespace d3d11
} // namespace gfx