template<typename EngineImplTraits>
RenderDeviceBase class
Base implementation of a render device.
| Template parameters | |
|---|---|
| EngineImplTraits | - Engine implementation type traits. |
Contents
Base classes
-
template<typename BaseInterface>class ObjectBase<EngineImplTraits::RenderDeviceInterface>
- Template class implementing base functionality for an object.
Derived classes
-
template<typename EngineImplTraits>class RenderDeviceD3DBase
- Base implementation of a D3D render device.
Constructors, destructors, conversion operators
- RenderDeviceBase(IReferenceCounters* pRefCounters, IMemoryAllocator& RawMemAllocator, IEngineFactory* pEngineFactory, Uint32 NumDeferredContexts)
Public functions
- void CreateResourceMapping(const ResourceMappingDesc& MappingDesc, IResourceMapping** ppMapping) final
- Implementation of IRenderDevice::
CreateResourceMapping(). - auto GetDeviceCaps() const -> const DeviceCaps& final
- Implementation of IRenderDevice::
GetDeviceCaps(). - auto GetDeviceProperties() const -> const DeviceProperties& final
- Implementation of IRenderDevice::
GetDeviceProperties(). -
auto GetTextureFormatInfo(TEXTURE_
FORMAT TexFormat) -> const TextureFormatInfo& final - Implementation of IRenderDevice::
GetTextureFormatInfo(). -
auto GetTextureFormatInfoExt(TEXTURE_
FORMAT TexFormat) -> const TextureFormatInfoExt& final - Implementation of IRenderDevice::
GetTextureFormatInfoExt(). - void SetImmediateContext(IDeviceContext* pImmediateContext)
- Set weak reference to the immediate context.
- void SetDeferredContext(size_t Ctx, IDeviceContext* pDeferredCtx)
- Set weak reference to the deferred context.
- auto GetNumDeferredContexts() const -> size_t
- Returns number of deferred contexts.
Protected functions
-
template<typename ObjectType, typename ObjectDescType, typename ObjectConstructorType>void CreateDeviceObject(const Char* ObjectTypeName, const ObjectDescType& Desc, ObjectType** ppObject, ObjectConstructorType ConstructObject)
- Helper template function to facilitate device object creation.
Protected variables
- StateObjectsRegistry<SamplerDesc> m_SamplersRegistry
- Sampler state registry.
- RefCntWeakPtr<IDeviceContext> m_wpImmediateContext
- Weak reference to the immediate context. Immediate context holds strong reference to the device, so we must use weak reference to avoid circular dependencies.
- std::vector<RefCntWeakPtr<IDeviceContext>, STDAllocatorRawMem<RefCntWeakPtr<IDeviceContext>>> m_wpDeferredContexts
- Weak references to deferred contexts.
- IMemoryAllocator& m_RawMemAllocator
- Raw memory allocator.
- FixedBlockMemoryAllocator m_TexObjAllocator
- Allocator for texture objects.
- FixedBlockMemoryAllocator m_TexViewObjAllocator
- Allocator for texture view objects.
- FixedBlockMemoryAllocator m_BufObjAllocator
- Allocator for buffer objects.
- FixedBlockMemoryAllocator m_BuffViewObjAllocator
- Allocator for buffer view objects.
- FixedBlockMemoryAllocator m_ShaderObjAllocator
- Allocator for shader objects.
- FixedBlockMemoryAllocator m_SamplerObjAllocator
- Allocator for sampler objects.
- FixedBlockMemoryAllocator m_PSOAllocator
- Allocator for pipeline state objects.
- FixedBlockMemoryAllocator m_SRBAllocator
- Allocator for shader resource binding objects.
- FixedBlockMemoryAllocator m_ResMappingAllocator
- Allocator for resource mapping objects.
- FixedBlockMemoryAllocator m_FenceAllocator
- Allocator for fence objects.
- FixedBlockMemoryAllocator m_QueryAllocator
- Allocator for query objects.
- FixedBlockMemoryAllocator m_RenderPassAllocator
- Allocator for render pass objects.
- FixedBlockMemoryAllocator m_FramebufferAllocator
- Allocator for framebuffer objects.
- FixedBlockMemoryAllocator m_BLASAllocator
- Allocator for bottom-level acceleration structure objects.
- FixedBlockMemoryAllocator m_TLASAllocator
- Allocator for top-level acceleration structure objects.
- FixedBlockMemoryAllocator m_SBTAllocator
- Allocator for shader binding table objects.
- FixedBlockMemoryAllocator m_PipeResSignAllocator
- Allocator for pipeline resource signature objects.
Function documentation
template<typename EngineImplTraits>
Diligent:: RenderDeviceBase<EngineImplTraits>:: RenderDeviceBase(IReferenceCounters* pRefCounters,
IMemoryAllocator& RawMemAllocator,
IEngineFactory* pEngineFactory,
Uint32 NumDeferredContexts)
| Parameters | |
|---|---|
| pRefCounters | - Reference counters object that controls the lifetime of this render device |
| RawMemAllocator | - Allocator that will be used to allocate memory for all device objects (including render device itself) |
| pEngineFactory | - Engine factory that was used to create this device |
| NumDeferredContexts | - The number of deferred device contexts |
template<typename EngineImplTraits>
template<typename ObjectType, typename ObjectDescType, typename ObjectConstructorType>
void Diligent:: RenderDeviceBase<EngineImplTraits>:: CreateDeviceObject(const Char* ObjectTypeName,
const ObjectDescType& Desc,
ObjectType** ppObject,
ObjectConstructorType ConstructObject) protected
Helper template function to facilitate device object creation.
| Template parameters | |
|---|---|
| ObjectType | - The type of the object being created (IBuffer, ITexture, etc.). |
| ObjectDescType | - The type of the object description structure (BufferDesc, TextureDesc, etc.). |
| ObjectConstructorType | - The type of the function that constructs the object. |
| Parameters | |
| ObjectTypeName | - String name of the object type ("buffer", "texture", etc.). |
| Desc | - Object description. |
| ppObject | - Memory address where the pointer to the created object will be stored. |
| ConstructObject | - Function that constructs the object. |