HatchitGraphics
ht_d3d12rootlayout.h
1 
15 #pragma once
16 
17 #include <ht_platform.h>
18 #include <ht_directx.h>
19 #include <ht_rootlayout_base.h>
20 #include <ht_rootlayout_resource.h>
21 #include <ht_refcounted.h>
22 #include <ht_sampler_resource.h>
23 
24 namespace Hatchit
25 {
26  namespace Graphics
27  {
28  namespace DX
29  {
30  class HT_API D3D12RootLayout : public RootLayoutBase
31  {
32  public:
33  enum class HeapType
34  {
35  RTV,
36  CBV_SRV_UAV,
37  DSV
38  };
39 
41 
42  ~D3D12RootLayout();
43 
44  bool Initialize(Resource::RootLayoutHandle handle, ID3D12Device* device);
45 
46  ID3D12RootSignature* GetRootSignature();
47 
48  private:
49  ID3D12RootSignature* m_rootSignature;
50 
51  std::vector<D3D12_DESCRIPTOR_RANGE*> m_allocatedRanges;
52 
53  void PostInitCleanup();
54  std::vector<D3D12_STATIC_SAMPLER_DESC> SamplerDescsFromHandle(const Resource::RootLayoutHandle& handle);
55 
56  D3D12_ROOT_SIGNATURE_FLAGS RootSignatureFlagsFromHandle(const Resource::RootLayoutHandle& handle);
57 
58  D3D12_COMPARISON_FUNC CompareOpFromType(const Resource::Sampler::CompareOperation op);
59  D3D12_STATIC_BORDER_COLOR BorderColorFromType(const Resource::Sampler::BorderColor color);
60  D3D12_FILTER FilterFromType(const Resource::Sampler::Filter& filter);
61  D3D12_TEXTURE_ADDRESS_MODE AddressModeFromType(const Resource::Sampler::AddressMode mode);
62 
63  };
64  }
65  }
66 }
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_color.h:19
Definition: ht_d3d12rootlayout.h:30
Definition: ht_rootlayout_base.h:23