Diligent Engine  v.2.4.g
RenderDeviceD3D12Impl.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2019-2021 Diligent Graphics LLC
3  * Copyright 2015-2019 Egor Yusov
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * In no event and under no legal theory, whether in tort (including negligence),
18  * contract, or otherwise, unless required by applicable law (such as deliberate
19  * and grossly negligent acts) or agreed to in writing, shall any Contributor be
20  * liable for any damages, including any direct, indirect, special, incidental,
21  * or consequential damages of any character arising as a result of this License or
22  * out of the use or inability to use the software (including but not limited to damages
23  * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
24  * all other commercial damages or losses), even if such Contributor has been advised
25  * of the possibility of such damages.
26  */
27 
28 #pragma once
29 
32 
33 #include <atomic>
34 
36 #include "RenderDeviceD3DBase.hpp"
38 #include "DescriptorHeap.hpp"
39 #include "CommandListManager.hpp"
40 #include "CommandContext.hpp"
41 #include "D3D12DynamicHeap.hpp"
42 #include "GenerateMips.hpp"
43 #include "QueryManagerD3D12.hpp"
44 #include "DXCompiler.hpp"
45 #include "RootSignature.hpp"
46 
47 
48 // The macros below are only defined in Win SDK 19041+ and are missing in 17763
49 #ifndef D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS
50 # define D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS (1073741824)
51 #endif
52 #ifndef D3D12_RAYTRACING_MAX_SHADER_RECORD_STRIDE
53 # define D3D12_RAYTRACING_MAX_SHADER_RECORD_STRIDE (4096)
54 #endif
55 #ifndef D3D12_RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE
56 # define D3D12_RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE (16777216)
57 #endif
58 #ifndef D3D12_RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE
59 # define D3D12_RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE (536870912)
60 #endif
61 #ifndef D3D12_RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE
62 # define D3D12_RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE (16777216)
63 #endif
64 
65 
66 namespace Diligent
67 {
68 
70 class RenderDeviceD3D12Impl final : public RenderDeviceNextGenBase<RenderDeviceD3DBase<EngineD3D12ImplTraits>, ICommandQueueD3D12>
71 {
72 public:
75 
77  IMemoryAllocator& RawMemAllocator,
78  IEngineFactory* pEngineFactory,
79  const EngineD3D12CreateInfo& EngineCI,
80  ID3D12Device* pD3D12Device,
81  size_t CommandQueueCount,
82  ICommandQueueD3D12** ppCmdQueues) noexcept(false);
84 
86 
87 
88  virtual void DILIGENT_CALL_TYPE CreateGraphicsPipelineState(const GraphicsPipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final;
89 
91  virtual void DILIGENT_CALL_TYPE CreateComputePipelineState(const ComputePipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final;
92 
94  virtual void DILIGENT_CALL_TYPE CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo& PSOCreateInfo, IPipelineState** ppPipelineState) override final;
95 
97  virtual void DILIGENT_CALL_TYPE CreateBuffer(const BufferDesc& BuffDesc,
98  const BufferData* pBuffData,
99  IBuffer** ppBuffer) override final;
100 
102  virtual void DILIGENT_CALL_TYPE CreateShader(const ShaderCreateInfo& ShaderCreateInfo, IShader** ppShader) override final;
103 
105  virtual void DILIGENT_CALL_TYPE CreateTexture(const TextureDesc& TexDesc,
106  const TextureData* pData,
107  ITexture** ppTexture) override final;
108 
109  void CreateTexture(const TextureDesc& TexDesc,
110  ID3D12Resource* pd3d12Texture,
111  RESOURCE_STATE InitialState,
112  class TextureD3D12Impl** ppTexture);
113 
116  ISampler** ppSampler) override final;
117 
119  virtual void DILIGENT_CALL_TYPE CreateFence(const FenceDesc& Desc, IFence** ppFence) override final;
120 
122  virtual void DILIGENT_CALL_TYPE CreateQuery(const QueryDesc& Desc, IQuery** ppQuery) override final;
123 
125  virtual void DILIGENT_CALL_TYPE CreateRenderPass(const RenderPassDesc& Desc,
126  IRenderPass** ppRenderPass) override final;
127 
129  virtual void DILIGENT_CALL_TYPE CreateFramebuffer(const FramebufferDesc& Desc,
130  IFramebuffer** ppFramebuffer) override final;
131 
133  virtual void DILIGENT_CALL_TYPE CreateBLAS(const BottomLevelASDesc& Desc,
134  IBottomLevelAS** ppBLAS) override final;
135 
137  virtual void DILIGENT_CALL_TYPE CreateTLAS(const TopLevelASDesc& Desc,
138  ITopLevelAS** ppTLAS) override final;
139 
141  virtual void DILIGENT_CALL_TYPE CreateSBT(const ShaderBindingTableDesc& Desc,
142  IShaderBindingTable** ppSBT) override final;
143 
146  IPipelineResourceSignature** ppSignature) override final;
147 
149  IPipelineResourceSignature** ppSignature,
150  bool IsDeviceInternal);
151 
153  virtual ID3D12Device* DILIGENT_CALL_TYPE GetD3D12Device() override final { return m_pd3d12Device; }
154 
156  virtual void DILIGENT_CALL_TYPE CreateTextureFromD3DResource(ID3D12Resource* pd3d12Texture,
157  RESOURCE_STATE InitialState,
158  ITexture** ppTexture) override final;
159 
161  virtual void DILIGENT_CALL_TYPE CreateBufferFromD3DResource(ID3D12Resource* pd3d12Buffer,
162  const BufferDesc& BuffDesc,
163  RESOURCE_STATE InitialState,
164  IBuffer** ppBuffer) override final;
165 
167  virtual void DILIGENT_CALL_TYPE CreateBLASFromD3DResource(ID3D12Resource* pd3d12BLAS,
168  const BottomLevelASDesc& Desc,
169  RESOURCE_STATE InitialState,
170  IBottomLevelAS** ppBLAS) override final;
171 
173  virtual void DILIGENT_CALL_TYPE CreateTLASFromD3DResource(ID3D12Resource* pd3d12TLAS,
174  const TopLevelASDesc& Desc,
175  RESOURCE_STATE InitialState,
176  ITopLevelAS** ppTLAS) override final;
177 
178  void CreateRootSignature(const RefCntAutoPtr<class PipelineResourceSignatureD3D12Impl>* ppSignatures, Uint32 SignatureCount, size_t Hash, RootSignatureD3D12** ppRootSig);
179 
180  RootSignatureCacheD3D12& GetRootSignatureCache() { return m_RootSignatureCache; }
181 
182  DescriptorHeapAllocation AllocateDescriptors(D3D12_DESCRIPTOR_HEAP_TYPE Type, UINT Count = 1);
183  DescriptorHeapAllocation AllocateGPUDescriptors(D3D12_DESCRIPTOR_HEAP_TYPE Type, UINT Count = 1);
184 
186  virtual void DILIGENT_CALL_TYPE IdleGPU() override final;
187 
190 
192 
194  Uint32 NumContexts,
195  PooledCommandContext pContexts[],
196  bool DiscardStaleObjects,
197  std::vector<std::pair<Uint64, RefCntAutoPtr<IFence>>>* pSignalFences);
198 
199  void SignalFences(Uint32 QueueIndex, std::vector<std::pair<Uint64, RefCntAutoPtr<IFence>>>& SignalFences);
200 
201  // Disposes an unused command context
203 
204  void FlushStaleResources(Uint32 CmdQueueIndex);
205 
207  virtual void DILIGENT_CALL_TYPE ReleaseStaleResources(bool ForceRelease = false) override final;
208 
209  D3D12DynamicMemoryManager& GetDynamicMemoryManager() { return m_DynamicMemoryManager; }
210 
211  GPUDescriptorHeap& GetGPUDescriptorHeap(D3D12_DESCRIPTOR_HEAP_TYPE Type)
212  {
213  VERIFY_EXPR(Type == D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV || Type == D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER);
214  return m_GPUDescriptorHeaps[Type];
215  }
216 
217  const GenerateMipsHelper& GetMipsGenerator() const { return m_MipsGenerator; }
218  QueryManagerD3D12& GetQueryManager() { return m_QueryMgr; }
219 
220  IDXCompiler* GetDxCompiler() const { return m_pDxCompiler.get(); }
221 
222 #define GET_D3D12_DEVICE(Version) \
223  ID3D12Device##Version* GetD3D12Device##Version() \
224  { \
225  DEV_CHECK_ERR(m_MaxD3D12DeviceVersion >= Version, "ID3D12Device", Version, \
226  " is not supported. Maximum supported version: ", \
227  m_MaxD3D12DeviceVersion); \
228  return static_cast<ID3D12Device##Version*>(m_pd3d12Device.p); \
229  }
235 #undef GET_D3D12_DEVICE
236 
237  struct Properties
238  {
239  const Uint32 ShaderGroupHandleSize = D3D12_SHADER_IDENTIFIER_SIZE_IN_BYTES;
241  const Uint32 ShaderGroupBaseAlignment = D3D12_RAYTRACING_SHADER_TABLE_BYTE_ALIGNMENT;
242  const Uint32 MaxDrawMeshTasksCount = 64000; // from specs: https://microsoft.github.io/DirectX-Specs/d3d/MeshShader.html#dispatchmesh-api
243  const Uint32 MaxRayTracingRecursionDepth = D3D12_RAYTRACING_MAX_DECLARABLE_TRACE_RECURSION_DEPTH;
248 
250  };
251 
252  const Properties& GetProperties() const
253  {
254  return m_Properties;
255  }
256 
257 private:
258  virtual void TestTextureFormat(TEXTURE_FORMAT TexFormat) override final;
259  void FreeCommandContext(PooledCommandContext&& Ctx);
260 
261  CComPtr<ID3D12Device> m_pd3d12Device;
262 
263  EngineD3D12CreateInfo m_EngineAttribs;
264 
265  CPUDescriptorHeap m_CPUDescriptorHeaps[D3D12_DESCRIPTOR_HEAP_TYPE_NUM_TYPES];
266  GPUDescriptorHeap m_GPUDescriptorHeaps[2]; // D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV == 0
267  // D3D12_DESCRIPTOR_HEAP_TYPE_SAMPLER == 1
268 
269  CommandListManager m_CmdListManager;
270 
271  std::mutex m_ContextPoolMutex;
272  std::vector<PooledCommandContext, STDAllocatorRawMem<PooledCommandContext>> m_ContextPool;
273 #ifdef DILIGENT_DEVELOPMENT
274  std::atomic_int m_AllocatedCtxCounter{0};
275 #endif
276 
277  D3D12DynamicMemoryManager m_DynamicMemoryManager;
278 
279  // Note: mips generator must be released after the device has been idled
280  GenerateMipsHelper m_MipsGenerator;
281 
282  QueryManagerD3D12 m_QueryMgr;
283 
284  Properties m_Properties;
285 
286  std::unique_ptr<IDXCompiler> m_pDxCompiler;
287 
288  FixedBlockMemoryAllocator m_RootSignatureAllocator;
289  RootSignatureCacheD3D12 m_RootSignatureCache;
290 
291 #ifdef DILIGENT_DEVELOPMENT
292  Uint32 m_MaxD3D12DeviceVersion = 0;
293 #endif
294 };
295 
296 } // namespace Diligent
Diligent::RenderDeviceD3D12Impl::Properties::MaxShaderRecordStride
const Uint32 MaxShaderRecordStride
Definition: RenderDeviceD3D12Impl.hpp:240
D3D12_RAYTRACING_MAX_SHADER_RECORD_STRIDE
#define D3D12_RAYTRACING_MAX_SHADER_RECORD_STRIDE
Definition: RenderDeviceD3D12Impl.hpp:53
Diligent::IRenderDeviceD3D12
Exposes Direct3D12-specific functionality of a render device.
Definition: RenderDeviceD3D12.h:51
Diligent::IReferenceCounters
Base interface for a reference counter object that stores the number of strong and weak references an...
Definition: ReferenceCounters.h:44
GenerateMips.hpp
Diligent::GraphicsPipelineStateCreateInfo
Graphics pipeline state creation attributes.
Definition: PipelineState.h:397
Diligent::Char
char Char
Definition: BasicTypes.h:64
Diligent::RenderDeviceD3D12Impl::CreateFramebuffer
virtual void CreateFramebuffer(const FramebufferDesc &Desc, IFramebuffer **ppFramebuffer) override final
Implementation of IRenderDevice::CreateFramebuffer() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:662
Diligent::SamplerDesc
Sampler description.
Definition: Sampler.h:58
DescriptorHeap.hpp
Diligent::ISampler
Texture sampler interface.
Definition: Sampler.h:192
Diligent::RayTracingPipelineStateCreateInfo
Ray tracing pipeline state description.
Definition: PipelineState.h:443
Diligent::RenderDeviceD3D12Impl::GetDynamicMemoryManager
D3D12DynamicMemoryManager & GetDynamicMemoryManager()
Definition: RenderDeviceD3D12Impl.hpp:209
Diligent::IPipelineResourceSignature
Pipeline resource signature interface.
Definition: PipelineResourceSignature.h:226
Diligent::RenderDeviceD3D12Impl::Properties::ShaderGroupHandleSize
const Uint32 ShaderGroupHandleSize
Definition: RenderDeviceD3D12Impl.hpp:239
CommandListManager.hpp
Diligent::PipelineResourceSignatureDesc
Pipeline resource signature description.
Definition: PipelineResourceSignature.h:166
Diligent::IShaderBindingTable
Shader binding table interface.
Definition: ShaderBindingTable.h:93
Diligent::RenderDeviceD3D12Impl::SignalFences
void SignalFences(Uint32 QueueIndex, std::vector< std::pair< Uint64, RefCntAutoPtr< IFence >>> &SignalFences)
Definition: RenderDeviceD3D12Impl.cpp:483
Diligent::RenderDeviceD3D12Impl::CreateRenderPass
virtual void CreateRenderPass(const RenderPassDesc &Desc, IRenderPass **ppRenderPass) override final
Implementation of IRenderDevice::CreateRenderPass() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:657
Diligent::ShaderVersion
Shader version.
Definition: Shader.h:177
Diligent::TopLevelASDesc
Top-level AS description.
Definition: TopLevelAS.h:49
Diligent::RenderDeviceD3D12Impl::GetProperties
const Properties & GetProperties() const
Definition: RenderDeviceD3D12Impl.hpp:252
Diligent::IPipelineState
Pipeline state interface.
Definition: PipelineState.h:505
Diligent::RootSignatureD3D12
Implementation of the Diligent::RootSignature class.
Definition: RootSignature.hpp:67
Diligent::QueryDesc
Query description.
Definition: Query.h:150
RenderDeviceNextGenBase.hpp
Diligent::RenderDeviceD3D12Impl::RenderDeviceD3D12Impl
RenderDeviceD3D12Impl(IReferenceCounters *pRefCounters, IMemoryAllocator &RawMemAllocator, IEngineFactory *pEngineFactory, const EngineD3D12CreateInfo &EngineCI, ID3D12Device *pD3D12Device, size_t CommandQueueCount, ICommandQueueD3D12 **ppCmdQueues) noexcept(false)
Definition: RenderDeviceD3D12Impl.cpp:98
Diligent::IShader
Shader interface.
Definition: Shader.h:428
Diligent::Uint64
uint64_t Uint64
64-bit unsigned integer
Definition: BasicTypes.h:50
Diligent::ITopLevelAS
Top-level AS interface.
Definition: TopLevelAS.h:151
Diligent::RenderDeviceD3D12Impl::AllocateDescriptors
DescriptorHeapAllocation AllocateDescriptors(D3D12_DESCRIPTOR_HEAP_TYPE Type, UINT Count=1)
Definition: RenderDeviceD3D12Impl.cpp:714
Diligent::RenderDeviceD3D12Impl::Properties::MaxInstancesPerTLAS
const Uint32 MaxInstancesPerTLAS
Definition: RenderDeviceD3D12Impl.hpp:245
Diligent::RenderDeviceD3D12Impl::GetMipsGenerator
const GenerateMipsHelper & GetMipsGenerator() const
Definition: RenderDeviceD3D12Impl.hpp:217
Diligent::RenderDeviceD3D12Impl::CloseAndExecuteCommandContexts
Uint64 CloseAndExecuteCommandContexts(Uint32 QueueIndex, Uint32 NumContexts, PooledCommandContext pContexts[], bool DiscardStaleObjects, std::vector< std::pair< Uint64, RefCntAutoPtr< IFence >>> *pSignalFences)
Definition: RenderDeviceD3D12Impl.cpp:423
Diligent::IFramebuffer
Framebuffer interface.
Definition: Framebuffer.h:73
DXCompiler.hpp
Diligent::RenderDeviceD3D12Impl::Properties::MaxGeometriesPerBLAS
const Uint32 MaxGeometriesPerBLAS
Definition: RenderDeviceD3D12Impl.hpp:247
Diligent::RenderDeviceD3D12Impl::Properties::MaxDrawMeshTasksCount
const Uint32 MaxDrawMeshTasksCount
Definition: RenderDeviceD3D12Impl.hpp:242
Diligent::RenderPassDesc
Render pass description.
Definition: RenderPass.h:341
QueryManagerD3D12.hpp
Diligent::RenderDeviceD3D12Impl::AllocateCommandContext
PooledCommandContext AllocateCommandContext(const Char *ID="")
Definition: RenderDeviceD3D12Impl.cpp:512
Diligent::RenderDeviceD3D12Impl::Properties
Definition: RenderDeviceD3D12Impl.hpp:237
Diligent::ShaderCreateInfo
Shader creation attributes.
Definition: Shader.h:241
Diligent::TextureD3D12Impl
Implementation of a texture object in Direct3D12 backend.
Definition: TextureD3D12Impl.hpp:42
Diligent::IBuffer
Buffer interface.
Definition: Buffer.h:187
Diligent::RenderDeviceD3D12Impl::IdleGPU
virtual void IdleGPU() override final
Implementation of IRenderDevice::IdleGPU() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:493
Diligent::CommandContext
Definition: CommandContext.hpp:66
Diligent::D3D12DynamicMemoryManager
Definition: D3D12DynamicHeap.hpp:122
Diligent::RenderDeviceD3D12Impl::Properties::MaxPrimitivesPerBLAS
const Uint32 MaxPrimitivesPerBLAS
Definition: RenderDeviceD3D12Impl.hpp:246
Diligent::GPUDescriptorHeap
Definition: DescriptorHeap.hpp:473
Diligent::GenerateMipsHelper
Definition: GenerateMips.hpp:55
Diligent::RenderDeviceNextGenBase
Base implementation of the render device for next-generation backends.
Definition: RenderDeviceNextGenBase.hpp:49
Diligent::RenderDeviceD3D12Impl::GetGPUDescriptorHeap
GPUDescriptorHeap & GetGPUDescriptorHeap(D3D12_DESCRIPTOR_HEAP_TYPE Type)
Definition: RenderDeviceD3D12Impl.hpp:211
Diligent::ShaderBindingTableDesc
Shader binding table description.
Definition: ShaderBindingTable.h:50
Diligent::ICommandQueueD3D12
Command queue interface.
Definition: CommandQueueD3D12.h:51
Diligent::TextureDesc
Texture description.
Definition: Texture.h:47
Diligent::RenderDeviceD3D12Impl
Render device implementation in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.hpp:70
Diligent::RootSignatureCacheD3D12
Root signature cache that deduplicates RootSignatureD3D12 objects.
Definition: RootSignature.hpp:168
Diligent::RenderDeviceD3D12Impl::CreateFence
virtual void CreateFence(const FenceDesc &Desc, IFence **ppFence) override final
Implementation of IRenderDevice::CreateFence() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:647
Diligent::IDXCompiler
DXC compiler interface.
Definition: DXCompiler.hpp:55
Diligent::RenderDeviceD3D12Impl::CreateTLASFromD3DResource
virtual void CreateTLASFromD3DResource(ID3D12Resource *pd3d12TLAS, const TopLevelASDesc &Desc, RESOURCE_STATE InitialState, ITopLevelAS **ppTLAS) override final
Implementation of IRenderDeviceD3D12::CreateTLASFromD3DResource().
Definition: RenderDeviceD3D12Impl.cpp:681
Diligent::RenderDeviceD3D12Impl::CreateQuery
virtual void CreateQuery(const QueryDesc &Desc, IQuery **ppQuery) override final
Implementation of IRenderDevice::CreateQuery() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:652
RenderDeviceD3DBase.hpp
IMPLEMENT_QUERY_INTERFACE_IN_PLACE
#define IMPLEMENT_QUERY_INTERFACE_IN_PLACE(InterfaceID, ParentClassName)
Definition: ObjectBase.hpp:59
Diligent::RefCntAutoPtr
Template class that implements reference counting.
Definition: RefCntAutoPtr.hpp:73
Diligent::EngineD3D12CreateInfo
Attributes specific to D3D12 engine.
Definition: GraphicsTypes.h:2099
Diligent::RenderDeviceD3D12Impl::TestTextureFormat
virtual void TestTextureFormat(TEXTURE_FORMAT TexFormat) override final
Definition: RenderDeviceD3D12Impl.cpp:540
DILIGENT_CALL_TYPE
#define DILIGENT_CALL_TYPE
Definition: CommonDefinitions.h:45
Diligent::TextureData
Describes the initial data to store in the texture.
Definition: Texture.h:221
Type
const D3D12_PIPELINE_STATE_SUBOBJECT_TYPE Type
Definition: PipelineStateD3D12Impl.cpp:69
Diligent::ComputePipelineStateCreateInfo
Compute pipeline state description.
Definition: PipelineState.h:427
Diligent::RenderDeviceD3D12Impl::AllocateGPUDescriptors
DescriptorHeapAllocation AllocateGPUDescriptors(D3D12_DESCRIPTOR_HEAP_TYPE Type, UINT Count=1)
Definition: RenderDeviceD3D12Impl.cpp:720
Diligent::Uint32
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Diligent::RenderDeviceD3D12Impl::Properties::ShaderGroupBaseAlignment
const Uint32 ShaderGroupBaseAlignment
Definition: RenderDeviceD3D12Impl.hpp:241
Diligent::RenderDeviceD3D12Impl::CreateBuffer
virtual void CreateBuffer(const BufferDesc &BuffDesc, const BufferData *pBuffData, IBuffer **ppBuffer) override final
Implementation of IRenderDevice::CreateBuffer() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:609
Diligent::RenderDeviceD3D12Impl::Properties::MaxShaderVersion
ShaderVersion MaxShaderVersion
Definition: RenderDeviceD3D12Impl.hpp:249
Diligent::RenderDeviceD3D12Impl::CreateSBT
virtual void CreateSBT(const ShaderBindingTableDesc &Desc, IShaderBindingTable **ppSBT) override final
Implementation of IRenderDevice::CreateSBT() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:695
RootSignature.hpp
Diligent::STDDeleter
Definition: STDAllocator.hpp:182
D3D12_RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE
#define D3D12_RAYTRACING_MAX_GEOMETRIES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE
Definition: RenderDeviceD3D12Impl.hpp:62
Diligent::TEXTURE_FORMAT
TEXTURE_FORMAT
Texture formats.
Definition: GraphicsTypes.h:328
Diligent::RenderDeviceD3D12Impl::DisposeCommandContext
void DisposeCommandContext(PooledCommandContext &&Ctx)
Definition: RenderDeviceD3D12Impl.cpp:389
D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS
#define D3D12_RAYTRACING_MAX_RAY_GENERATION_SHADER_THREADS
Definition: RenderDeviceD3D12Impl.hpp:50
Diligent::RenderDeviceD3D12Impl::CreatePipelineResourceSignature
virtual void CreatePipelineResourceSignature(const PipelineResourceSignatureDesc &Desc, IPipelineResourceSignature **ppSignature) override final
Implementation of IRenderDevice::CreatePipelineResourceSignature() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:701
Diligent::BufferDesc
Buffer description.
Definition: Buffer.h:74
Diligent::RenderDeviceD3D12Impl::CreateTextureFromD3DResource
virtual void CreateTextureFromD3DResource(ID3D12Resource *pd3d12Texture, RESOURCE_STATE InitialState, ITexture **ppTexture) override final
Implementation of IRenderDeviceD3D12::CreateTextureFromD3DResource().
Definition: RenderDeviceD3D12Impl.cpp:620
Diligent::RenderDeviceD3D12Impl::FlushStaleResources
void FlushStaleResources(Uint32 CmdQueueIndex)
Definition: RenderDeviceD3D12Impl.cpp:499
EngineD3D12ImplTraits.hpp
Diligent::CPUDescriptorHeap
Definition: DescriptorHeap.hpp:387
Diligent::IMemoryAllocator
Base interface for a raw memory allocator.
Definition: MemoryAllocator.h:41
Diligent::RenderDeviceD3D12Impl::CreateTexture
virtual void CreateTexture(const TextureDesc &TexDesc, const TextureData *pData, ITexture **ppTexture) override final
Implementation of IRenderDevice::CreateTexture() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:637
Diligent::IFence
Fence interface.
Definition: Fence.h:62
std
Definition: AdvancedMath.hpp:979
Diligent::RenderDeviceD3D12Impl::CreateShader
virtual void CreateShader(const ShaderCreateInfo &ShaderCreateInfo, IShader **ppShader) override final
Implementation of IRenderDevice::CreateShader() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:615
CommandContext.hpp
Diligent::RenderDeviceD3D12Impl::CreateComputePipelineState
virtual void CreateComputePipelineState(const ComputePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override final
Implementation of IRenderDevice::CreateComputePipelineState() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:594
Diligent::IQuery
Query interface.
Definition: Query.h:177
Diligent::RenderDeviceD3D12Impl::Properties::MaxRayGenThreads
const Uint32 MaxRayGenThreads
Definition: RenderDeviceD3D12Impl.hpp:244
Diligent::RenderDeviceD3D12Impl::CreateSampler
virtual void CreateSampler(const SamplerDesc &SamplerDesc, ISampler **ppSampler) override final
Implementation of IRenderDevice::CreateSampler() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:642
D3D12_RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE
#define D3D12_RAYTRACING_MAX_INSTANCES_PER_TOP_LEVEL_ACCELERATION_STRUCTURE
Definition: RenderDeviceD3D12Impl.hpp:56
Diligent::RenderDeviceD3D12Impl::~RenderDeviceD3D12Impl
~RenderDeviceD3D12Impl()
Definition: RenderDeviceD3D12Impl.cpp:363
Diligent::RenderDeviceD3D12Impl::CreateBLAS
virtual void CreateBLAS(const BottomLevelASDesc &Desc, IBottomLevelAS **ppBLAS) override final
Implementation of IRenderDevice::CreateBLAS() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:675
VERIFY_EXPR
#define VERIFY_EXPR(...)
Definition: DebugUtilities.hpp:79
Diligent::FramebufferDesc
Framebuffer description.
Definition: Framebuffer.h:46
Diligent::IBottomLevelAS
Bottom-level AS interface.
Definition: BottomLevelAS.h:207
Diligent::QueryManagerD3D12
Definition: QueryManagerD3D12.hpp:44
Diligent::RenderDeviceD3D12Impl::CreateTLAS
virtual void CreateTLAS(const TopLevelASDesc &Desc, ITopLevelAS **ppTLAS) override final
Implementation of IRenderDevice::CreateTLAS() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:689
Diligent::RenderDeviceD3D12Impl::CreateBLASFromD3DResource
virtual void CreateBLASFromD3DResource(ID3D12Resource *pd3d12BLAS, const BottomLevelASDesc &Desc, RESOURCE_STATE InitialState, IBottomLevelAS **ppBLAS) override final
Implementation of IRenderDeviceD3D12::CreateBLASFromD3DResource().
Definition: RenderDeviceD3D12Impl.cpp:667
GET_D3D12_DEVICE
#define GET_D3D12_DEVICE(Version)
Definition: RenderDeviceD3D12Impl.hpp:222
Diligent::RenderDeviceD3D12Impl::CloseAndExecuteTransientCommandContext
void CloseAndExecuteTransientCommandContext(Uint32 CommandQueueIndex, PooledCommandContext &&Ctx)
Definition: RenderDeviceD3D12Impl.cpp:407
Diligent::RenderDeviceD3D12Impl::CreateGraphicsPipelineState
virtual void CreateGraphicsPipelineState(const GraphicsPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override final
Implementation of IRenderDevice::CreateGraphicsPipelineState() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:589
D3D12_RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE
#define D3D12_RAYTRACING_MAX_PRIMITIVES_PER_BOTTOM_LEVEL_ACCELERATION_STRUCTURE
Definition: RenderDeviceD3D12Impl.hpp:59
Diligent::RenderDeviceD3D12Impl::ReleaseStaleResources
virtual void ReleaseStaleResources(bool ForceRelease=false) override final
Implementation of IRenderDevice::() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:506
Diligent::RESOURCE_STATE
RESOURCE_STATE
Resource usage state.
Definition: GraphicsTypes.h:2814
Diligent::RenderDeviceD3D12Impl::GetD3D12Device
virtual ID3D12Device * GetD3D12Device() override final
Implementation of IRenderDeviceD3D12::GetD3D12Device().
Definition: RenderDeviceD3D12Impl.hpp:153
Diligent::RenderDeviceD3D12Impl::PooledCommandContext
std::unique_ptr< CommandContext, STDDeleterRawMem< CommandContext > > PooledCommandContext
Definition: RenderDeviceD3D12Impl.hpp:188
Diligent::RenderDeviceD3D12Impl::CreateRootSignature
void CreateRootSignature(const RefCntAutoPtr< class PipelineResourceSignatureD3D12Impl > *ppSignatures, Uint32 SignatureCount, size_t Hash, RootSignatureD3D12 **ppRootSig)
Definition: RenderDeviceD3D12Impl.cpp:726
D3D12DynamicHeap.hpp
Diligent::BufferData
Describes the buffer initial data.
Definition: Buffer.h:155
Diligent::RenderDeviceD3D12Impl::CreateBufferFromD3DResource
virtual void CreateBufferFromD3DResource(ID3D12Resource *pd3d12Buffer, const BufferDesc &BuffDesc, RESOURCE_STATE InitialState, IBuffer **ppBuffer) override final
Implementation of IRenderDeviceD3D12::CreateBufferFromD3DResource().
Definition: RenderDeviceD3D12Impl.cpp:604
Diligent::BottomLevelASDesc
Bottom-level AS description.
Definition: BottomLevelAS.h:145
Diligent::IEngineFactory
Engine factory base interface.
Definition: EngineFactory.h:60
Diligent::DescriptorHeapAllocation
Definition: DescriptorHeap.hpp:67
Diligent::FenceDesc
Fence description.
Definition: Fence.h:43
Diligent::ITexture
Texture inteface.
Definition: Texture.h:273
Diligent::CommandListManager
Definition: CommandListManager.hpp:39
Diligent::RenderDeviceD3D12Impl::GetQueryManager
QueryManagerD3D12 & GetQueryManager()
Definition: RenderDeviceD3D12Impl.hpp:218
Diligent::IRenderPass
Render pass interface.
Definition: RenderPass.h:369
Diligent::RenderDeviceD3D12Impl::CreateRayTracingPipelineState
virtual void CreateRayTracingPipelineState(const RayTracingPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override final
Implementation of IRenderDevice::CreateRayTracingPipelineState() in Direct3D12 backend.
Definition: RenderDeviceD3D12Impl.cpp:599
Diligent::RenderDeviceD3D12Impl::Properties::MaxRayTracingRecursionDepth
const Uint32 MaxRayTracingRecursionDepth
Definition: RenderDeviceD3D12Impl.hpp:243
Diligent::RenderDeviceD3D12Impl::GetDxCompiler
IDXCompiler * GetDxCompiler() const
Definition: RenderDeviceD3D12Impl.hpp:220
Diligent
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
Diligent::RenderDeviceD3D12Impl::GetRootSignatureCache
RootSignatureCacheD3D12 & GetRootSignatureCache()
Definition: RenderDeviceD3D12Impl.hpp:180