blob: 90abf1b854b13a8205677917fc3136b4dbef8749 (
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
|
// metal-framebuffer.h
#pragma once
#include "metal-base.h"
namespace gfx
{
using namespace Slang;
namespace metal
{
enum
{
kMaxRenderTargets = 8,
kMaxTargets = kMaxRenderTargets + 1,
};
class FramebufferLayoutImpl : public FramebufferLayoutBase
{
public:
List<IFramebufferLayout::TargetLayout> m_renderTargets;
IFramebufferLayout::TargetLayout m_depthStencil;
public:
Result init(const IFramebufferLayout::Desc& desc);
};
class FramebufferImpl : public FramebufferBase
{
public:
BreakableReference<DeviceImpl> m_device;
RefPtr<FramebufferLayoutImpl> m_layout;
ShortList<RefPtr<TextureResourceViewImpl>> m_renderTargetViews;
RefPtr<TextureResourceViewImpl> m_depthStencilView;
uint32_t m_width;
uint32_t m_height;
uint32_t m_sampleCount;
public:
Result init(DeviceImpl* device, const IFramebuffer::Desc& desc);
};
} // namespace metal
} // namespace gfx
|