yum-mirror/slang

Making it easier to work with shaders

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

lucy96chenSplit render-d3d12.h/cpp into a set of smaller files (#2231)5a3aa6159

master
869 B38 linesraw
1// d3d12-framebuffer.h
2#pragma once
3
4#include "d3d12-base.h"
5#include "d3d12-resource-views.h"
6
7namespace gfx
8{
9namespace d3d12
10{
11
12using namespace Slang;
13
14class FramebufferLayoutImpl : public FramebufferLayoutBase
15{
16public:
17    ShortList<IFramebufferLayout::TargetLayout> m_renderTargets;
18    bool m_hasDepthStencil = false;
19    IFramebufferLayout::TargetLayout m_depthStencil;
20};
21
22class FramebufferImpl : public FramebufferBase
23{
24public:
25    ShortList<RefPtr<ResourceViewImpl>> renderTargetViews;
26    RefPtr<ResourceViewImpl> depthStencilView;
27    ShortList<D3D12_CPU_DESCRIPTOR_HANDLE> renderTargetDescriptors;
28    struct Color4f
29    {
30        float values[4];
31    };
32    ShortList<Color4f> renderTargetClearValues;
33    D3D12_CPU_DESCRIPTOR_HANDLE depthStencilDescriptor;
34    DepthStencilClearValue depthStencilClearValue;
35};
36
37} // namespace d3d12
38} // namespace gfx