Diligent Engine - v2.5.3
This release introduces a new major feature - render state cache.
The cache object (IRenderStateCache
) provides methods to create shaders and pipeline states that are identical to the methods of the render device. However, for each call the cache attempts to find the object data (e.g. compiled shader bytecode, pipeline state data etc.) to avoid expensive operations (such as shader compilation). If the data is not found, the object is created and its data is added to the cache. The cache data can be requested from the cache, stored in a file and loaded next time.
Another major capability of the render state cache is hot shader reloading. The cache stores all data required to create shader objects, and when Reload
method is called, the cache automatically detects which shaders need to be recompiled and which pipeline states need to be updated. The pipelines are updated transparently for the application.
Tutorials
Two new tutorials have been added.
Tutorial 25 - Render State Packager shows how to create and archive pipeline states with the render state packager off-line tool on the example of a simple path tracer.
Tutorial 26 - Render State Cache expands the path tracing technique implemented in previous tutorial and demonstrates how to use the render state cache to save pipeline states created at run time and load them when the application starts.
API Changes
- Added
RENDER_STATE_CACHE_LOG_LEVEL
enum, replacedEnableLogging
member ofRenderStateCacheCreateInfo
struct withLoggingLevel
(API252009) - Added
IPipelineResourceSignature::CopyStaticResources
andIPipelineState::CopyStaticResources
methods (API252008) - Added render state cache (
IRenderStateCache
interface and related data types) (API252007) - Moved
UseCombinedTextureSamplers
andCombinedSamplerSuffix
members fromShaderCreateInfo
toShaderDesc
(API252006) - Added
IntanceLayerCount
andppInstanceLayerNames
members to EngineVkCreateInfo struct (API252005) - Added
IgnoreDebugMessageCount
andppIgnoreDebugMessageNames
toEngineVkCreateInfo
struct (API252004) - Refactored archiver API (removed
IDeviceObjectArchive
andIArchive
; enabled dearchiver
to load multiple archives to allow storing signatures and pipelines separately) (API252003) - Added
SET_SHADER_RESOURCES_FLAGS
enum andFlags
parameter toIShaderResourceVariable::Set
andIShaderResourceVariable::SetArray
methods (API252002) - Added primitive topologies with adjacency (API252001)