Render device interface. More...
#include <RenderDevice.h>
Public Member Functions | |
virtual void DILIGENT_CALL_TYPE | CreateBuffer (const BufferDesc &BuffDesc, const BufferData *pBuffData, IBuffer **ppBuffer)=0 |
Creates a new buffer object. | |
virtual void DILIGENT_CALL_TYPE | CreateShader (const ShaderCreateInfo &ShaderCI, IShader **ppShader, IDataBlob **ppCompilerOutput=nullptr)=0 |
Creates a new shader object. | |
virtual void DILIGENT_CALL_TYPE | CreateTexture (const TextureDesc &TexDesc, const TextureData *pData, ITexture **ppTexture)=0 |
Creates a new texture object. | |
virtual void DILIGENT_CALL_TYPE | CreateSampler (const SamplerDesc &SamDesc, ISampler **ppSampler)=0 |
Creates a new sampler object. | |
virtual void DILIGENT_CALL_TYPE | CreateResourceMapping (const ResourceMappingCreateInfo &ResMappingCI, IResourceMapping **ppMapping)=0 |
Creates a new resource mapping. | |
virtual void DILIGENT_CALL_TYPE | CreateGraphicsPipelineState (const GraphicsPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a new graphics pipeline state object. | |
virtual void DILIGENT_CALL_TYPE | CreateComputePipelineState (const ComputePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a new compute pipeline state object. | |
virtual void DILIGENT_CALL_TYPE | CreateRayTracingPipelineState (const RayTracingPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a new ray tracing pipeline state object. | |
virtual void DILIGENT_CALL_TYPE | CreateTilePipelineState (const TilePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a new tile pipeline state object. | |
virtual void DILIGENT_CALL_TYPE | CreateFence (const FenceDesc &Desc, IFence **ppFence)=0 |
Creates a new fence object. | |
virtual void DILIGENT_CALL_TYPE | CreateQuery (const QueryDesc &Desc, IQuery **ppQuery)=0 |
Creates a new query object. | |
virtual void DILIGENT_CALL_TYPE | CreateRenderPass (const RenderPassDesc &Desc, IRenderPass **ppRenderPass)=0 |
Creates a render pass object. | |
virtual void DILIGENT_CALL_TYPE | CreateFramebuffer (const FramebufferDesc &Desc, IFramebuffer **ppFramebuffer)=0 |
Creates a framebuffer object. | |
virtual void DILIGENT_CALL_TYPE | CreateBLAS (const BottomLevelASDesc &Desc, IBottomLevelAS **ppBLAS)=0 |
Creates a bottom-level acceleration structure object (BLAS). | |
virtual void DILIGENT_CALL_TYPE | CreateTLAS (const TopLevelASDesc &Desc, ITopLevelAS **ppTLAS)=0 |
Creates a top-level acceleration structure object (TLAS). | |
virtual void DILIGENT_CALL_TYPE | CreateSBT (const ShaderBindingTableDesc &Desc, IShaderBindingTable **ppSBT)=0 |
Creates a shader resource binding table object (SBT). | |
virtual void DILIGENT_CALL_TYPE | CreatePipelineResourceSignature (const PipelineResourceSignatureDesc &Desc, IPipelineResourceSignature **ppSignature)=0 |
Creates a pipeline resource signature object. | |
virtual void DILIGENT_CALL_TYPE | CreateDeviceMemory (const DeviceMemoryCreateInfo &CreateInfo, IDeviceMemory **ppMemory)=0 |
Creates a device memory object. | |
virtual void DILIGENT_CALL_TYPE | CreatePipelineStateCache (const PipelineStateCacheCreateInfo &CreateInfo, IPipelineStateCache **ppPSOCache)=0 |
Creates a pipeline state cache object. | |
virtual void DILIGENT_CALL_TYPE | CreateDeferredContext (IDeviceContext **ppContext)=0 |
Creates a deferred context. | |
virtual const RenderDeviceInfo &DILIGENT_CALL_TYPE | GetDeviceInfo () const =0 |
Returns the device information, see Diligent::RenderDeviceInfo for details. | |
virtual const GraphicsAdapterInfo &DILIGENT_CALL_TYPE | GetAdapterInfo () const =0 |
Returns the graphics adapter information, see Diligent::GraphicsAdapterInfo for details. | |
virtual const TextureFormatInfo &DILIGENT_CALL_TYPE | GetTextureFormatInfo (TEXTURE_FORMAT TexFormat) const =0 |
Returns the basic texture format information. | |
virtual const TextureFormatInfoExt &DILIGENT_CALL_TYPE | GetTextureFormatInfoExt (TEXTURE_FORMAT TexFormat)=0 |
Returns the extended texture format information. | |
virtual SparseTextureFormatInfo DILIGENT_CALL_TYPE | GetSparseTextureFormatInfo (TEXTURE_FORMAT TexFormat, RESOURCE_DIMENSION Dimension, Uint32 SampleCount) const =0 |
Returns the sparse texture format info for the given texture format, resource dimension and sample count. | |
virtual void DILIGENT_CALL_TYPE | ReleaseStaleResources (Bool ForceRelease=false)=0 |
virtual void DILIGENT_CALL_TYPE | IdleGPU ()=0 |
Waits until all outstanding operations on the GPU are complete. | |
virtual IEngineFactory *DILIGENT_CALL_TYPE | GetEngineFactory () const =0 |
Returns engine factory this device was created from. | |
virtual IThreadPool *DILIGENT_CALL_TYPE | GetShaderCompilationThreadPool () const =0 |
Returns a pointer to the shader compilation thread pool. | |
void | CreatePipelineState (const GraphicsPipelineStateCreateInfo &CI, IPipelineState **ppPipelineState) |
Overloaded alias for CreateGraphicsPipelineState. | |
void | CreatePipelineState (const ComputePipelineStateCreateInfo &CI, IPipelineState **ppPipelineState) |
Overloaded alias for CreateComputePipelineState. | |
void | CreatePipelineState (const RayTracingPipelineStateCreateInfo &CI, IPipelineState **ppPipelineState) |
Overloaded alias for CreateRayTracingPipelineState. | |
void | CreatePipelineState (const TilePipelineStateCreateInfo &CI, IPipelineState **ppPipelineState) |
Overloaded alias for CreateTilePipelineState. | |
![]() | |
virtual void DILIGENT_CALL_TYPE | QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0 |
Queries the specific interface. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | AddRef ()=0 |
Increments the number of strong references by 1. | |
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE | Release ()=0 |
virtual IReferenceCounters *DILIGENT_CALL_TYPE | GetReferenceCounters () const =0 |
Render device interface.
|
pure virtual |
Creates a bottom-level acceleration structure object (BLAS).
[in] | Desc | - BLAS description, see Diligent::BottomLevelASDesc for details. |
[out] | ppBLAS | - Address of the memory location where a pointer to the BLAS interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new buffer object.
[in] | BuffDesc | - Buffer description, see Diligent::BufferDesc for details. |
[in] | pBuffData | - Pointer to Diligent::BufferData structure that describes initial buffer data or nullptr if no data is provided. Immutable buffers (USAGE_IMMUTABLE) must be initialized at creation time. |
[out] | ppBuffer | - Address of the memory location where a pointer to the buffer interface will be written. The function calls AddRef(), so that the new buffer will have one reference and must be released by a call to Release(). |
Size of a uniform buffer (Diligent::BIND_UNIFORM_BUFFER) must be multiple of 16.
Stride of a formatted buffer will be computed automatically from the format if ElementByteStride member of buffer description is set to default value (0).
|
pure virtual |
Creates a new compute pipeline state object.
[in] | PSOCreateInfo | - Compute pipeline state create info, see Diligent::ComputePipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the pipeline state interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a deferred context.
[out] | ppContext | - Address of the memory location where a pointer to the deferred context interface will be written. |
|
pure virtual |
Creates a device memory object.
[in] | CreateInfo | - Device memory create info, see Diligent::DeviceMemoryCreateInfo for details. |
[out] | ppMemory | - Address of the memory location where a pointer to the device memory interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new fence object.
[in] | Desc | - Fence description, see Diligent::FenceDesc for details. |
[out] | ppFence | - Address of the memory location where a pointer to the fence interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a framebuffer object.
[in] | Desc | - Framebuffer description, see Diligent::FramebufferDesc for details. |
[out] | ppFramebuffer | - Address of the memory location where a pointer to the framebuffer interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new graphics pipeline state object.
[in] | PSOCreateInfo | - Graphics pipeline state create info, see Diligent::GraphicsPipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the pipeline state interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a pipeline resource signature object.
[in] | Desc | - Resource signature description, see Diligent::PipelineResourceSignatureDesc for details. |
[out] | ppSignature | - Address of the memory location where a pointer to the pipeline resource signature interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a pipeline state cache object.
[in] | CreateInfo | - Pipeline state cache create info, see Diligent::PiplineStateCacheCreateInfo for details. |
[out] | ppPSOCache | - Address of the memory location where a pointer to the pipeline state cache interface will be written. The function calls AddRef(), so that the new object will have one reference. |
On devices that don't support pipeline state caches (e.g. Direct3D11, OpenGL), the method will silently do nothing.
|
pure virtual |
Creates a new query object.
[in] | Desc | - Query description, see Diligent::QueryDesc for details. |
[out] | ppQuery | - Address of the memory location where a pointer to the query interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new ray tracing pipeline state object.
[in] | PSOCreateInfo | - Ray tracing pipeline state create info, see Diligent::RayTracingPipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the pipeline state interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a render pass object.
[in] | Desc | - Render pass description, see Diligent::RenderPassDesc for details. |
[out] | ppRenderPass | - Address of the memory location where a pointer to the render pass interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new resource mapping.
[in] | ResMappingCI | - Resource mapping create info, see Diligent::ResourceMappingCreateInfo for details. |
[out] | ppMapping | - Address of the memory location where a pointer to the resource mapping interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new sampler object.
[in] | SamDesc | - Sampler description, see Diligent::SamplerDesc for details. |
[out] | ppSampler | - Address of the memory location where a pointer to the sampler interface will be written. The function calls AddRef(), so that the new object will have one reference. |
If an application attempts to create a sampler interface with the same attributes as an existing interface, the same interface will be returned.
In D3D11, 4096 unique sampler state objects can be created on a device at a time.
|
pure virtual |
Creates a shader resource binding table object (SBT).
[in] | Desc | - SBT description, see Diligent::ShaderBindingTableDesc for details. |
[out] | ppSBT | - Address of the memory location where a pointer to the SBT interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a new shader object.
[in] | ShaderCI | - Shader create info, see Diligent::ShaderCreateInfo for details. |
[out] | ppShader | - Address of the memory location where a pointer to the shader interface will be written. The function calls AddRef(), so that the new object will have one reference. |
[out] | ppCompilerOutput | - Address of the memory location where a pointer to the the compiler output data blob will be written. If null, the compiler output will be ignored. |
The buffer returned in ppCompilerOutput contains two null-terminated strings. The first one is the compiler output message. The second one is the full shader source code including definitions added by the engine. The data blob object must be released by the client.
|
pure virtual |
Creates a new texture object.
[in] | TexDesc | - Texture description, see Diligent::TextureDesc for details. |
[in] | pData | - Pointer to Diligent::TextureData structure that describes initial texture data or nullptr if no data is provided. Immutable textures (USAGE_IMMUTABLE) must be initialized at creation time. |
[out] | ppTexture | - Address of the memory location where a pointer to the texture interface will be written. The function calls AddRef(), so that the new object will have one reference. |
To create all mip levels, set the TexDesc.MipLevels to zero.
Multisampled resources cannot be initialized with data when they are created.
If initial data is provided, number of subresources must exactly match the number of subresources in the texture (which is the number of mip levels times the number of array slices. For a 3D texture, this is just the number of mip levels). For example, for a 15 x 6 x 2 2D texture array, the following array of subresources should be provided:
15x6, 7x3, 3x1, 1x1, 15x6, 7x3, 3x1, 1x1.
For a 15 x 6 x 4 3D texture, the following array of subresources should be provided:
15x6x4, 7x3x2, 3x1x1, 1x1x1
|
pure virtual |
Creates a new tile pipeline state object.
[in] | PSOCreateInfo | - Tile pipeline state create info, see Diligent::TilePipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the pipeline state interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Creates a top-level acceleration structure object (TLAS).
[in] | Desc | - TLAS description, see Diligent::TopLevelASDesc for details. |
[out] | ppTLAS | - Address of the memory location where a pointer to the TLAS interface will be written. The function calls AddRef(), so that the new object will have one reference. |
|
pure virtual |
Returns engine factory this device was created from.
This method does not increment the reference counter of the returned interface, so an application must not call Release().
|
pure virtual |
Returns a pointer to the shader compilation thread pool.
This method does not increment the reference counter of the returned interface, so an application must not call Release().
|
pure virtual |
Returns the basic texture format information.
See Diligent::TextureFormatInfo for details on the provided information.
[in] | TexFormat | - Texture format for which to provide the information |
|
pure virtual |
Returns the extended texture format information.
See Diligent::TextureFormatInfoExt for details on the provided information.
[in] | TexFormat | - Texture format for which to provide the information |
The first time this method is called for a particular format, it may be considerably slower than GetTextureFormatInfo(). If you do not require extended information, call GetTextureFormatInfo() instead.
|
pure virtual |
Waits until all outstanding operations on the GPU are complete.
The method does not flush immediate contexts, so it will only wait for commands that the contexts using IDeviceContext::Flush() if it needs to make sure all recorded commands have been previously submitted for execution. An application should explicitly flush are complete when the method returns.
|
pure virtual |
Purges device release queues and releases all stale resources. This method is automatically called by ISwapChain::Present() of the primary swap chain.
[in] | ForceRelease | - Forces release of all objects. Use this option with great care only if you are sure the resources are not in use by the GPU (such as when the device has just been idled). |