yum-mirror/slang

Making it easier to work with shaders

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

Ellie Hermaszewskaformatf65d756bf

master
844 B54 linesraw
1// d3d11-resource-views.h
2#pragma once
3
4#include "d3d11-base.h"
5
6namespace gfx
7{
8
9using namespace Slang;
10
11namespace d3d11
12{
13
14class ResourceViewImpl : public ResourceViewBase
15{
16public:
17    enum class Type
18    {
19        SRV,
20        UAV,
21        DSV,
22        RTV,
23    };
24    Type m_type;
25};
26
27class ShaderResourceViewImpl : public ResourceViewImpl
28{
29public:
30    ComPtr<ID3D11ShaderResourceView> m_srv;
31};
32
33class UnorderedAccessViewImpl : public ResourceViewImpl
34{
35public:
36    ComPtr<ID3D11UnorderedAccessView> m_uav;
37};
38
39class DepthStencilViewImpl : public ResourceViewImpl
40{
41public:
42    ComPtr<ID3D11DepthStencilView> m_dsv;
43    DepthStencilClearValue m_clearValue;
44};
45
46class RenderTargetViewImpl : public ResourceViewImpl
47{
48public:
49    ComPtr<ID3D11RenderTargetView> m_rtv;
50    float m_clearValue[4];
51};
52
53} // namespace d3d11
54} // namespace gfx