Diligent Engine
 
Loading...
Searching...
No Matches
DeviceContext.h File Reference
#include "../../../Primitives/interface/Object.h"
#include "../../../Primitives/interface/FlagEnum.h"
#include "GraphicsTypes.h"
#include "Constants.h"
#include "Buffer.h"
#include "InputLayout.h"
#include "Shader.h"
#include "Texture.h"
#include "Sampler.h"
#include "ResourceMapping.h"
#include "TextureView.h"
#include "BufferView.h"
#include "DepthStencilState.h"
#include "BlendState.h"
#include "PipelineState.h"
#include "Fence.h"
#include "Query.h"
#include "RenderPass.h"
#include "Framebuffer.h"
#include "CommandList.h"
#include "SwapChain.h"
#include "BottomLevelAS.h"
#include "TopLevelAS.h"
#include "ShaderBindingTable.h"
#include "DeviceMemory.h"
#include "CommandQueue.h"
#include "../../../Primitives/interface/DefineInterfaceHelperMacros.h"
#include "../../../Primitives/interface/UndefInterfaceHelperMacros.h"

Classes

struct  Diligent::DeviceContextDesc
 Device context description. More...
 
struct  Diligent::DrawAttribs
 Defines the draw command attributes. More...
 
struct  Diligent::DrawIndexedAttribs
 Defines the indexed draw command attributes. More...
 
struct  Diligent::DrawIndirectAttribs
 Defines the indirect draw command attributes. More...
 
struct  Diligent::DrawIndexedIndirectAttribs
 Defines the indexed indirect draw command attributes. More...
 
struct  Diligent::DrawMeshAttribs
 Defines the mesh draw command attributes. More...
 
struct  Diligent::DrawMeshIndirectAttribs
 Defines the mesh indirect draw command attributes. More...
 
struct  Diligent::MultiDrawItem
 Multi-draw command item. More...
 
struct  Diligent::MultiDrawAttribs
 MultiDraw command attributes. More...
 
struct  Diligent::MultiDrawIndexedItem
 Multi-draw indexed command item. More...
 
struct  Diligent::MultiDrawIndexedAttribs
 MultiDraw command attributes. More...
 
struct  Diligent::DispatchComputeAttribs
 Describes dispatch command arguments. More...
 
struct  Diligent::DispatchComputeIndirectAttribs
 Describes dispatch command arguments. More...
 
struct  Diligent::DispatchTileAttribs
 Describes tile dispatch command arguments. More...
 
struct  Diligent::ResolveTextureSubresourceAttribs
 Describes multi-sampled texture resolve command arguments. More...
 
struct  Diligent::Viewport
 Describes the viewport. More...
 
struct  Diligent::Rect
 Describes the rectangle. More...
 
struct  Diligent::CopyTextureAttribs
 Defines copy texture command attributes. More...
 
struct  Diligent::SetRenderTargetsAttribs
 SetRenderTargetsExt command attributes. More...
 
struct  Diligent::BeginRenderPassAttribs
 BeginRenderPass command attributes. More...
 
struct  Diligent::BLASBuildTriangleData
 Triangle geometry data description. More...
 
struct  Diligent::BLASBuildBoundingBoxData
 AABB geometry data description. More...
 
struct  Diligent::BuildBLASAttribs
 This structure is used by IDeviceContext::BuildBLAS(). More...
 
struct  Diligent::InstanceMatrix
 Row-major 4x3 matrix. More...
 
struct  Diligent::TLASBuildInstanceData
 This structure is used by BuildTLASAttribs. More...
 
struct  Diligent::BuildTLASAttribs
 This structure is used by IDeviceContext::BuildTLAS(). More...
 
struct  Diligent::CopyBLASAttribs
 This structure is used by IDeviceContext::CopyBLAS(). More...
 
struct  Diligent::CopyTLASAttribs
 This structure is used by IDeviceContext::CopyTLAS(). More...
 
struct  Diligent::WriteBLASCompactedSizeAttribs
 This structure is used by IDeviceContext::WriteBLASCompactedSize(). More...
 
struct  Diligent::WriteTLASCompactedSizeAttribs
 This structure is used by IDeviceContext::WriteTLASCompactedSize(). More...
 
struct  Diligent::TraceRaysAttribs
 This structure is used by IDeviceContext::TraceRays(). More...
 
struct  Diligent::TraceRaysIndirectAttribs
 This structure is used by IDeviceContext::TraceRaysIndirect(). More...
 
struct  Diligent::UpdateIndirectRTBufferAttribs
 This structure is used by IDeviceContext::UpdateSBT(). More...
 
struct  Diligent::SparseBufferMemoryBindRange
 Defines the sparse buffer memory binding range. More...
 
struct  Diligent::SparseBufferMemoryBindInfo
 Defines the sparse buffer memory binding information. More...
 
struct  Diligent::SparseTextureMemoryBindRange
 Defines the sparse texture memory binding range. More...
 
struct  Diligent::SparseTextureMemoryBindInfo
 Sparse texture memory binding information. More...
 
struct  Diligent::BindSparseResourceMemoryAttribs
 Attributes of the IDeviceContext::BindSparseResourceMemory() command. More...
 
struct  Diligent::StateTransitionDesc
 Resource state transition barrier description. More...
 
struct  Diligent::DeviceContextCommandCounters
 Device context command counters. More...
 
struct  Diligent::DeviceContextStats
 Device context statistics. More...
 
struct  Diligent.IDeviceContext
 Device context interface. More...
 

Namespaces

namespace  Diligent
 Graphics engine namespace.
 

Macros

#define DILIGENT_TLAS_INSTANCE_OFFSET_AUTO   0xFFFFFFFFU
 
#define DILIGENT_TLAS_INSTANCE_DATA_SIZE   64
 
#define DILIGENT_REMAINING_MIP_LEVELS   0xFFFFFFFFU
 Special constant for all remaining mipmap levels.
 
#define DILIGENT_REMAINING_ARRAY_SLICES   0xFFFFFFFFU
 Special constant for all remaining array slices.
 

Enumerations

enum  Diligent::DRAW_FLAGS : Uint8 {
  Diligent::DRAW_FLAG_NONE = 0u , Diligent::DRAW_FLAG_VERIFY_STATES = 1u << 0u , Diligent::DRAW_FLAG_VERIFY_DRAW_ATTRIBS = 1u << 1u , Diligent::DRAW_FLAG_VERIFY_ALL = DRAW_FLAG_VERIFY_STATES | DRAW_FLAG_VERIFY_DRAW_ATTRIBS ,
  Diligent::DRAW_FLAG_DYNAMIC_RESOURCE_BUFFERS_INTACT = 1u << 2u
}
 Draw command flags. More...
 
enum  Diligent::RESOURCE_STATE_TRANSITION_MODE : Uint8 { Diligent::RESOURCE_STATE_TRANSITION_MODE_NONE = 0 , Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION , Diligent::RESOURCE_STATE_TRANSITION_MODE_VERIFY }
 Defines resource state transition mode performed by various commands. More...
 
enum  Diligent::CLEAR_DEPTH_STENCIL_FLAGS : Uint32 { Diligent::CLEAR_DEPTH_FLAG_NONE = 0x00 , Diligent::CLEAR_DEPTH_FLAG = 0x01 , Diligent::CLEAR_STENCIL_FLAG = 0x02 }
 Defines which parts of the depth-stencil buffer to clear. More...
 
enum  Diligent::SET_VERTEX_BUFFERS_FLAGS : Uint8 { Diligent::SET_VERTEX_BUFFERS_FLAG_NONE = 0x00 , Diligent::SET_VERTEX_BUFFERS_FLAG_RESET = 0x01 }
 Defines allowed flags for IDeviceContext::SetVertexBuffers() function. More...
 
enum  Diligent::RAYTRACING_INSTANCE_FLAGS : Uint8 {
  Diligent::RAYTRACING_INSTANCE_NONE = 0 , Diligent::RAYTRACING_INSTANCE_TRIANGLE_FACING_CULL_DISABLE = 0x01 , Diligent::RAYTRACING_INSTANCE_TRIANGLE_FRONT_COUNTERCLOCKWISE = 0x02 , Diligent::RAYTRACING_INSTANCE_FORCE_OPAQUE = 0x04 ,
  Diligent::RAYTRACING_INSTANCE_FORCE_NO_OPAQUE = 0x08 , RAYTRACING_INSTANCE_FLAG_LAST = RAYTRACING_INSTANCE_FORCE_NO_OPAQUE
}
 TLAS instance flags that are used in IDeviceContext::BuildTLAS(). More...
 
enum  Diligent::COPY_AS_MODE : Uint8 { Diligent::COPY_AS_MODE_CLONE = 0 , Diligent::COPY_AS_MODE_COMPACT , COPY_AS_MODE_LAST = COPY_AS_MODE_COMPACT }
 Defines acceleration structure copy mode. More...
 
enum  Diligent::RAYTRACING_GEOMETRY_FLAGS : Uint8 { Diligent::RAYTRACING_GEOMETRY_FLAG_NONE = 0 , Diligent::RAYTRACING_GEOMETRY_FLAG_OPAQUE = 0x01 , Diligent::RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION = 0x02 , RAYTRACING_GEOMETRY_FLAG_LAST = RAYTRACING_GEOMETRY_FLAG_NO_DUPLICATE_ANY_HIT_INVOCATION }
 Defines geometry flags for ray tracing. More...
 
enum  Diligent::STATE_TRANSITION_FLAGS : Uint8 { Diligent::STATE_TRANSITION_FLAG_NONE = 0 , Diligent::STATE_TRANSITION_FLAG_UPDATE_STATE = 1u << 0 , Diligent::STATE_TRANSITION_FLAG_DISCARD_CONTENT = 1u << 1 , Diligent::STATE_TRANSITION_FLAG_ALIASING = 1u << 2 }
 Resource state transition flags. More...
 

Detailed Description

Definition of the Diligent::IDeviceContext interface and related data structures

Macro Definition Documentation

◆ DILIGENT_TLAS_INSTANCE_DATA_SIZE

#define DILIGENT_TLAS_INSTANCE_DATA_SIZE   64

Top-level AS instance size in bytes in GPU side. Used to calculate size of BuildTLASAttribs::pInstanceBuffer.

◆ DILIGENT_TLAS_INSTANCE_OFFSET_AUTO

#define DILIGENT_TLAS_INSTANCE_OFFSET_AUTO   0xFFFFFFFFU

Can be used to calculate the TLASBuildInstanceData::ContributionToHitGroupIndex depending on instance count, geometry count in each instance (in TLASBuildInstanceData::pBLAS) and shader binding mode in BuildTLASAttribs::BindingMode.

Example: InstanceOffset = BaseContributionToHitGroupIndex; For each instance in TLAS if (Instance.ContributionToHitGroupIndex == TLAS_INSTANCE_OFFSET_AUTO) Instance.ContributionToHitGroupIndex = InstanceOffset; if (BindingMode == HIT_GROUP_BINDING_MODE_PER_GEOMETRY) InstanceOffset += Instance.pBLAS->GeometryCount() * HitGroupStride; if (BindingMode == HIT_GROUP_BINDING_MODE_PER_INSTANCE) InstanceOffset += HitGroupStride;