Render state cache interface. More...
#include <RenderStateCache.h>
Public Member Functions | |
virtual bool DILIGENT_CALL_TYPE | Load (const IDataBlob *pCacheData, Uint32 ContentVersion=~0u, bool MakeCopy=false)=0 |
Loads the cache contents. | |
virtual bool DILIGENT_CALL_TYPE | CreateShader (const ShaderCreateInfo &ShaderCI, IShader **ppShader)=0 |
Creates a shader object from cached data. | |
virtual bool DILIGENT_CALL_TYPE | CreateGraphicsPipelineState (const GraphicsPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a graphics pipeline state object from cached data. | |
virtual bool DILIGENT_CALL_TYPE | CreateComputePipelineState (const ComputePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a compute pipeline state object from cached data. | |
virtual bool DILIGENT_CALL_TYPE | CreateRayTracingPipelineState (const RayTracingPipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a ray tracing pipeline state object from cached data. | |
virtual bool DILIGENT_CALL_TYPE | CreateTilePipelineState (const TilePipelineStateCreateInfo &PSOCreateInfo, IPipelineState **ppPipelineState)=0 |
Creates a tile pipeline state object from cached data. | |
virtual Bool DILIGENT_CALL_TYPE | WriteToBlob (Uint32 ContentVersion, IDataBlob **ppBlob)=0 |
Writes cache contents to a memory blob. | |
virtual Bool DILIGENT_CALL_TYPE | WriteToStream (Uint32 ContentVersion, IFileStream *pStream)=0 |
Writes cache contents to a file stream. | |
virtual void DILIGENT_CALL_TYPE | Reset ()=0 |
Resets the cache to default state. | |
virtual Uint32 DILIGENT_CALL_TYPE | Reload (ReloadGraphicsPipelineCallbackType ReloadGraphicsPipeline=nullptr, void *pUserData=nullptr)=0 |
Reloads render states in the cache. | |
virtual Uint32 DILIGENT_CALL_TYPE | GetContentVersion () const =0 |
Returns the content version of the cache data. | |
virtual Uint32 DILIGENT_CALL_TYPE | GetReloadVersion () const =0 |
Returns the reload version of the cache data. | |
![]() | |
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 state cache interface.
|
pure virtual |
Creates a compute pipeline state object from cached data.
[in] | PSOCreateInfo | - Compute pipeline state create info, see Diligent::ComputePipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the created pipeline state object will be written. |
|
pure virtual |
Creates a graphics pipeline state object from cached data.
[in] | PSOCreateInfo | - Graphics pipeline state create info, see Diligent::GraphicsPipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the created pipeline state object will be written. |
|
pure virtual |
Creates a ray tracing pipeline state object from cached data.
[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 created pipeline state object will be written. |
|
pure virtual |
Creates a shader object from cached data.
[in] | ShaderCI | - Shader create info, see Diligent::ShaderCreateInfo for details. |
[out] | ppShader | - Address of the memory location where a pointer to the created shader object will be written. |
|
pure virtual |
Creates a tile pipeline state object from cached data.
[in] | PSOCreateInfo | - Tile pipeline state create info, see Diligent::TilePipelineStateCreateInfo for details. |
[out] | ppPipelineState | - Address of the memory location where a pointer to the created pipeline state object will be written. |
|
pure virtual |
Returns the content version of the cache data.
If no data has been loaded, returns ~0u
(aka 0xFFFFFFFF
).
|
pure virtual |
Returns the reload version of the cache data.
The reload version is incremented every time the cache is reloaded.
|
pure virtual |
Loads the cache contents.
[in] | pCacheData | - A pointer to the cache data to load objects from. |
[in] | ContentVersion | - The expected version of the content in the cache. If the version of the content in the cache does not match the expected version, the method will fail. If default value is used (~0u aka 0xFFFFFFFF ), the version will not be checked. |
[in] | MakeCopy | - Whether to make a copy of the data blob, or use the the original contents. |
If the data were not copied, the cache will keep a strong reference to the pCacheData data blob. It will be kept alive until the cache object is released or the Reset() method is called.
|
pure virtual |
Reloads render states in the cache.
[in] | ReloadGraphicsPipeline | - An optional callback function that will be called by the render state cache to let the application modify graphics pipeline state info before creating new pipeline. |
[in] | pUserData | - A pointer to the user-specific data to pass to ReloadGraphicsPipeline callback. |
Reloading is only enabled if the cache was created with the EnableHotReload
member of Diligent::RenderStateCacheCreateInfo
struct set to true.
|
pure virtual |
Writes cache contents to a memory blob.
[in] | ContentVersion | - The version of the content to write. |
[out] | ppBlob | - Address of the memory location where a pointer to the created data blob will be written. |
~0u
(aka 0xFFFFFFFF
), the version of the previously loaded content will be used, or 0 if none was loaded.
|
pure virtual |
Writes cache contents to a file stream.
[in] | ContentVersion | - The version of the content to write. |
[in] | pStream | - Pointer to the IFileStream interface to use for writing. |
~0u
(aka 0xFFFFFFFF
), the version of the previously loaded content will be used, or 0 if none was loaded.