yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
6857dd575
master
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{ 16kMaxRenderTargets = 8 , 17kMaxTargets = kMaxRenderTargets + 1 , 18}; 19 20class FramebufferLayoutImpl :public FramebufferLayoutBase 21{ 22public : 23List < IFramebufferLayout ::TargetLayout > m_renderTargets ; 24IFramebufferLayout ::TargetLayout m_depthStencil ; 25 26public : 27Result init (const IFramebufferLayout ::Desc & desc ); 28}; 29 30class FramebufferImpl :public FramebufferBase 31{ 32public : 33BreakableReference < DeviceImpl > m_device ; 34RefPtr < FramebufferLayoutImpl > m_layout ; 35ShortList < RefPtr < TextureResourceViewImpl >>m_renderTargetViews ; 36RefPtr < TextureResourceViewImpl > m_depthStencilView ; 37uint32_t m_width ; 38uint32_t m_height ; 39uint32_t m_sampleCount ; 40 41public : 42Result init (DeviceImpl * device ,const IFramebuffer ::Desc & desc ); 43}; 44 45}// namespace metal 46}// namespace gfx