yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

skallweitNV[gfx] Metal graphics support (#4324)6857dd575

master
916 B46 linesraw
1// metal-framebuffer.h
2#pragma once
3
4#include "metal-base.h"
5
6namespace gfx
7{
8
9using namespace Slang;
10
11namespace metal
12{
13
14enum
15{
16    kMaxRenderTargets = 8,
17    kMaxTargets = kMaxRenderTargets + 1,
18};
19
20class FramebufferLayoutImpl : public FramebufferLayoutBase
21{
22public:
23    List<IFramebufferLayout::TargetLayout> m_renderTargets;
24    IFramebufferLayout::TargetLayout m_depthStencil;
25
26public:
27    Result init(const IFramebufferLayout::Desc& desc);
28};
29
30class FramebufferImpl : public FramebufferBase
31{
32public:
33    BreakableReference<DeviceImpl> m_device;
34    RefPtr<FramebufferLayoutImpl> m_layout;
35    ShortList<RefPtr<TextureResourceViewImpl>> m_renderTargetViews;
36    RefPtr<TextureResourceViewImpl> m_depthStencilView;
37    uint32_t m_width;
38    uint32_t m_height;
39    uint32_t m_sampleCount;
40
41public:
42    Result init(DeviceImpl* device, const IFramebuffer::Desc& desc);
43};
44
45} // namespace metal
46} // namespace gfx