Base implementation of a render device. More...
#include <RenderDeviceBase.hpp>
Public Member Functions | |
RenderDeviceBase (IReferenceCounters *pRefCounters, IMemoryAllocator &RawMemAllocator, IEngineFactory *pEngineFactory, const EngineCreateInfo &EngineCI, const GraphicsAdapterInfo &AdapterInfo) | |
virtual void DILIGENT_CALL_TYPE | CreateResourceMapping (const ResourceMappingCreateInfo &ResMappingCI, IResourceMapping **ppMapping) override final |
Implementation of IRenderDevice::CreateResourceMapping(). | |
virtual const RenderDeviceInfo &DILIGENT_CALL_TYPE | GetDeviceInfo () const override final |
Implementation of IRenderDevice::GetDeviceInfo(). | |
virtual const GraphicsAdapterInfo &DILIGENT_CALL_TYPE | GetAdapterInfo () const override final |
Implementation of IRenderDevice::GetAdapterInfo(). | |
virtual const TextureFormatInfo &DILIGENT_CALL_TYPE | GetTextureFormatInfo (TEXTURE_FORMAT TexFormat) const override final |
Implementation of IRenderDevice::GetTextureFormatInfo(). | |
virtual const TextureFormatInfoExt &DILIGENT_CALL_TYPE | GetTextureFormatInfoExt (TEXTURE_FORMAT TexFormat) override final |
Implementation of IRenderDevice::GetTextureFormatInfoExt(). | |
virtual void DILIGENT_CALL_TYPE | CreateTilePipelineState (const TilePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState) override |
Base implementation of IRenderDevice::CreateTilePipelineState(). | |
void | SetImmediateContext (size_t Ctx, DeviceContextImplType *pImmediateContext) |
Set weak reference to the immediate context. | |
size_t | GetNumImmediateContexts () const |
Returns the number of immediate contexts. | |
size_t | GetNumDeferredContexts () const |
Returns number of deferred contexts. | |
Protected Member 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 Attributes | |
ObjectsRegistry< SamplerDesc, RefCntAutoPtr< ISampler > > | m_SamplersRegistry |
Sampler state registry. | |
std::vector< RefCntWeakPtr< DeviceContextImplType >, STDAllocatorRawMem< RefCntWeakPtr< DeviceContextImplType > > > | m_wpImmediateContexts |
std::mutex | m_DeferredCtxMtx |
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. | |
FixedBlockMemoryAllocator | m_MemObjAllocator |
Allocator for device memory objects. | |
FixedBlockMemoryAllocator | m_PSOCacheAllocator |
Allocator for pipeline state cache objects. | |
Base implementation of a render device.
EngineImplTraits | - Engine implementation type traits. |
|
inline |
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 |
EngineCI | - Engine create info struct, see Diligent::EngineCreateInfo. |
AdapterInfo | - Graphics adapter info, see Diligent::AdapterInfo. |
|
inlineprotected |
Helper template function to facilitate device object creation.
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. |
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. |
|
protected |
Weak references to immediate contexts. Immediate contexts hold strong reference to the device, so we must use weak references to avoid circular dependencies.