Releases: DiligentGraphics/DiligentEngine
Diligent Engine - v2.5.6
This release significantly enhances Diligent Engine by introducing the WebGPU backend, making the web a first-class citizen in the Diligent Engine ecosystem. WebGPU is a modern graphics API specifically designed for the web, offering several key advantages over WebGL. These enhancements are now fully leveraged by Diligent Engine, providing:
- Lower Overhead and Higher Rendering Performance: WebGPU reduces CPU overhead, allowing more efficient use of hardware resources, leading to smoother and faster rendering.
- Support for Compute Shaders: Unlike WebGL, WebGPU natively supports compute shaders, enabling more complex and parallel computations directly on the GPU.
- Improved API Design: WebGPU offers a more streamlined and explicit API, reducing ambiguity and making it easier for developers to harness the full power of modern GPUs.
- Enhanced Resource Management: WebGPU provides better control over memory and resource management, leading to more predictable performance and reduced latency.
In addition to the WebGPU backend, this release also introduces asynchronous shader compilation. This feature allows shaders to be compiled in parallel, preventing the rendering thread from being blocked during compilation. Asynchronous shader compilation is fully supported in the WebGPU backend, ensuring a smooth and responsive experience even during complex rendering tasks.
We are also excited to announce that samples are now available to run directly on the web. You can explore these samples at the Diligent Engine Samples Website (https://diligentgraphics.github.io/). This makes it easier than ever to see the power of Diligent Engine in action, directly in your browser.
API Changes
- Implemented WebGPU backend
- Added
EngineWebGPUCreateInfo
- Added
IEngineFactoryWebGPU
interface - Added
RENDER_DEVICE_TYPE_WEBGPU
,SHADER_SOURCE_LANGUAGE_WGSL
,SHADER_VARIABLE_FLAG_UNFILTERABLE_FLOAT_TEXTURE_WEBGPU
,
SHADER_VARIABLE_FLAG_NON_FILTERING_SAMPLER_WEBGPU
enum values - Added
WEB_GPU_BINDING_TYPE
enum,WebGPUResourceAttribs
struct, and
WebGPUResourceAttribs WebGPUAttribs
member toPipelineResourceDesc
struct - Added WebGPU-specific interfaces (
IRenderDeviceWebGPU
,IDeviceContextWebGPU
, etc.)
- Added
- Enabled asynchronous shdare and pipeline state compilation (API255001)
- Added
AsyncShaderCompilation
render device feature - Added
pAsyncShaderCompilationThreadPool
andNumAsyncShaderCompilerThreads
members toEngineCreateInfo
struct - Added
SHADER_COMPILE_FLAG_ASYNCHRONOUS
andPSO_CREATE_FLAG_ASYNCHRONOUS
flags - Added
SHADER_STATUS
andPIPELINE_STATE_STATUS
enums - Added
IShader::GetStatus
andIPipelineState::GetStatus
methods
- Added
Diligent Engine - v2.5.5
This release packs a lot of new features and improvements.
New High-Level Rendering components
- Post Processing effects:
- Hydrogent, an implementation of the Hydra rendering API in Diligent Engine.
- PBR Material Improvements:
New Samples and Tutorials
API Changes
- Added
MultiDraw
andMultiDrawIndexed
commands (API254006) - Added
SerializationDeviceGLInfo
struct (API254005)- The
ValidateShaders
member allows disabling time-consuming shader compilation
- The
- Replaced
AnisotropicFilteringSupported
member ofSamplerProperties
struct withMaxAnisotropy
(API254004) - Added
TextureSubresourceViews
device feature (API254003) - Added device context rendering statistics (API254002)
- Added
DeviceContextStats
struct - Added
IDeviceContext::ClearStats
andIDeviceContext::GetStats
methods
- Added
IDeviceContext::TransitionShaderResources
: removed unusedpPipelineState
parameter (API254001)
Diligent Engine - v2.5.4
Besides a number of API improvements (such as read-only depth buffers, texture component swizzle, shader constant buffer reflection) and bug fixes, this release enables the Dot Net support. Applications targeting Dot Net can use the NuGet package that implements the Core Diligent API.
A new tutorial demonstrates how to use the Diligent Engine in a Dot Net application.
API Changes
- Use thread group count X/Y/Z for mesh draw commands (API253012)
- Added
ShaderMacroArray
struct (API253011)- The
Macros
member ofShaderCreateInfo
struct is now of typeShaderMacroArray
- The
- Replaced
ResourceMappingDesc
withResourceMappingCreateInfo
(API253010)- Use
ResourceMappingCreateInfo::NumEntries
to define the number of entries instead of the trailing null entry
- Use
- Removed
ShaderCreateInfo::ppConversionStream
(API253009) - Removed
ppCompilerOutput
member of theShaderCreateInfo
struct and added it as parameter to theIRenderDevice::CreateShader
method (API253008) - Added
IPipelineStateGL::GetGLProgramHandle
andIShaderGL::GetGLShaderHandle
methods (API253007) - Enabled read-only depth-stencil buffers (API253006)
- Added
TEXTURE_VIEW_READ_ONLY_DEPTH_STENCIL
view type - Added
UseReadOnlyDSV
member toGraphicsPipelineDesc
struct
- Added
- Added
PSO_CACHE_FLAGS
enum andPipelineStateCacheDesc::Flags
member (API253005) - Archiver and render state cache: added content version (API253004)
- Added
RenderDeviceShaderVersionInfo
struct andRenderDeviceInfo::MaxShaderVersion
member (API253003) - Added texture component swizzle (API253002)
- Added
TEXTURE_COMPONENT_SWIZZLE
enum andTextureComponentMapping
struct - Added
Swizzle
member toTextureViewDesc
struct - Added
TextureComponentSwizzle
member toDeviceFeatures
struct
- Added
- Added shader constant buffer reflection API (API253001)
- Added
SHADER_CODE_BASIC_TYPE
andSHADER_CODE_VARIABLE_CLASS
enums - Added
ShaderCodeVariableDesc
andShaderCodeBufferDesc
structs - Added
IShader::GetConstantBufferDesc
method
- Added
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)
Diligent Engine - v2.5.2
This release introduces an API for packaging render state objects (shaders, pipeline states, resource singatures, render passes) into archives. An object archive contains data optimized for run-time loading performance (shaders are compiled into optimized byte code and patched to match resource signatures, if necessary; internal pipeline resource layouts are initialized; all objects are verified for compatibility and correctness etc.). One archive may contain data for multiple backends (e.g. Direct3D12, Vulkan, OpenGL).
The two key new interfaces are IArchiver that packs resource states into an archive, and IDearchiver that unpacks the states from the archive at run time.
This release also introduces Diligent Render State Notation, a JSON-based language that describes shaders, pipeline states, resource signatures and other objects in a convenient form, e.g.:
{
"Shaders": [
{
"Desc": {
"Name": "My Vertex shader",
"ShaderType": "VERTEX"
},
"SourceLanguage": "HLSL",
"FilePath": "cube.vsh"
},
{
"Desc": {
"Name": "My Pixel shader",
"ShaderType": "PIXEL"
},
"SourceLanguage": "HLSL",
"FilePath": "cube.psh",
}
],
"Pipeleines": [
{
"GraphicsPipeline": {
"DepthStencilDesc": {
"DepthEnable": true
},
"RTVFormats": {
"0": "RGBA8_UNORM_SRGB"
},
"RasterizerDesc": {
"CullMode": "FRONT"
},
},
"PSODesc": {
"Name": "My Pipeline State",
"PipelineType": "GRAPHICS"
},
"pVS": "My Vertex shader",
"pPS": "My Pixel shader"
}
]
}
Render state notation files can be parsed and loaded dynamically at run time. Alternatively, an application can use a packaging tool to preprocess pipeline descriptions (compile shaders for target platforms, define internal resource layouts, etc.) into archives off-line.
Among other improvements are bug fixes, pipeline state cache support and samplers with unnormalized coordinates.
Diligent Engine - v2.5.1
This release introduces the following major features:
- Variable rate shading gives applications control over the frequency at which pixel shading is performed, allowing applications to trade quality for performance and power savings.
- Sparse (aka partially resident or tiled) resources are large virtual resources only partially baked by the physical memory. Spare resources are very useful for handling large scenes such as open environments, terrain, in mega texturing techniques, etc.
- Emscripten platform support allows applications built with Diligent Engine to run in web browsers.
API Changes
- Added subsampled render targets for VRS (API Version 250011)
- Added sparse resources (API Version 250010)
- Updated API to use 64bit offsets for GPU memory (API Version 250009)
- Reworked draw indirect command attributes (moved buffers into the attribs structs), removed DrawMeshIndirectCount (API Version 250008)
- Enabled indirect multidraw commands (API Version 250007)
- Enabled variable rate shading (API Version 250006)
- Added
TransferQueueTimestampQueries
feature (API Version 250005) - Added
RESOURCE_STATE_COMMON
state; addedSTATE_TRANSITION_FLAGS
enum and replaced
StateTransitionDesc::UpdateResourceState
withSTATE_TRANSITION_FLAGS Flags
(API Version 250004) - Added
ComputeShaderProperties
struct (API Version 250003) - Added
IShaderResourceBinding::CheckResources
method andSHADER_RESOURCE_VARIABLE_TYPE_FLAGS
enum (API Version 250002) - Removed
IShaderResourceVariable::IsBound
withIShaderResourceVariable::Get
(API Version 250001)
Samples and tutorials
New Tutorial23 - Command Queues demonstrates how to use multiple command queues to perform rendering in parallel with copy and compute operations.
Another new Tutorial24 - Variable rate shading demonstrates how to use variable rate shading to reduce the pixel shading load.
Diligent Engine - v2.5
A major release that introduces a number of significant improvements:
- Pipeline resource signatures enable applications to define explicit shader resource layouts that allow sharing shader resource binding objects between different pipeline states.
- Multiple immediate contexts is an abstraction over multiple command queues that enables e.g. async compute and parallel rendering.
- Inline ray-tracing is a powerful extension to ray tracing that allows casting rays from regular shaders (pixel, compute, etc.).
- Ray tracing on Metal is now also supported by Diligent Engine.
- Debug groups improve debugging and profiling experience.
- Wave operations enable sharing data between threads in one shader thread group.
- Tile shaders is a special type of shader currently only available on Metal that is similar to compute shader, but processes on-chip tile memory.
- Memoryless framebuffer attachments enable memory savings on mobile platforms.
API Changes
- Added
MISC_TEXTURE_FLAG_MEMORYLESS
flag (API Version 250000) - Removed
RayTracing2
device feature and addedRAY_TRACING_CAP_FLAGS
enum (API Version 240099) - Added tile shaders (API Version 240098)
- Added
PIPELINE_TYPE_TILE
andSHADER_TYPE_TILE
enum values - Added
TileShaders
device feature - Added
TilePipelineDesc
,TilePipelineStateCreateInfo
andDispatchTileAttribs
structs - Added
IRenderDevice::CreateTilePipelineState
,IPipelineState::GetTilePipelineDesc
,
IDeviceContext::DispatchTile
andIDeviceContext::GetTileSize
methods
- Added
- Removed
GetNextFenceValue
,GetCompletedFenceValue
, andIsFenceSignaled
methods fromIRenderDeviceD3D12
andIRenderDeviceVk
interfaces
as they are now inICommandQueue
interface (API Version 240097) - Added
ICommandQueue
interface,IDeviceContext::LockCommandQueue
andIDeviceContext::UnlockCommandQueue
methods,
removed fence query methods fromIRenderDeviceVk
,IRenderDeviceD3D12
, andIRenderDeviceMtl
(API Version 240096) - Added multiple immediate device contexts and refactored adapter queries (API Version 240095)
CommandQueueMask
member ofTextureDesc
,BufferDesc
,PipelineStateDesc
,TopLevelASDesc
,
andBottomLevelASDesc
, was renamed toImmediateContextMask
- Added
pContext
member toTextureData
andBufferData
structs to indicate which context to
use for initialization. - Removed
GetDeviceCaps
andGetDeviceProperties
IDeviceContext
methods and added
GetDeviceInfo
andGetAdapterInfo
methods; addedRenderDeviceInfo
struct. - Renamed
SamplerCaps
toSamplerProperties,
TextureCapsto
TextureProperties; added
BufferProperties,
RayTracingProperties, and
MeshShaderProperties` structs - Removed
DeviceLimits
struct - Removed
DeviceCaps
struct and moved its members toGraphicsAdapterInfo
andRenderDeviceInfo
structs - Added
NativeFence
toDeviceFeatures
- Added
CommandQueueInfo
struct - Added
COMMAND_QUEUE_TYPE
andQUEUE_PRIORITY
enums - Renamed
ShaderVersion
struct toVersion
- Reworked
GraphicsAdapterInfo
struct - Added
ImmediateContextCreateInfo
struct andpImmediateContextInfo
,NumImmediateContexts
members toEngineCreateInfo
struct - Added
AdapterId
andGraphicsAPIVersion
members toEngineCreateInfo
struct - Removed
DIRECT3D_FEATURE_LEVEL
enum - Added
FENCE_TYPE
enum - Renamed
IFence::Reset
toIFence::Signal
; addedIFence::Wait
method - Added
IEngineFactory::EnumerateAdapters
method - Added
DeviceContextDesc
struct andIDeviceContext::GetDesc
method - Added
IDeviceContext::Begin
method, renamedIDeviceContext::SignalFence
toIDeviceContext::EnqueueSignal
- Added debug annotations
IDeviceContext::BeginDebugGroup
,IDeviceContext::EndDebugGroup
,
IDeviceContext::InsertDebugLabel
(API Version 240095) - Added
DefaultVariableMergeStages
member toPipelineResourceLayoutDesc
struct (API240094) - Added
IShaderResourceVariable::SetBufferRange
andIShaderResourceVariable::SetBufferOffset
methods,
addedDeviceLimits
struct (API240093) - Updated API to allow explicitly flushing/invlidating mapped buffer memory range :
addedMEMORY_PROPERTIES
enum,IBuffer::GetMemoryProperties()
,IBuffer::FlushMappedRange()
,
andIBuffer::InvalidateMappedRange()
methods (API240092) - Added
IDeviceContext::SetUserData()
andIDeviceContext::GetUserData()
methods (API240091) - Added
SHADER_VARIABLE_FLAGS
enum andSHADER_VARIABLE_FLAGS Flags
member to ShaderResourceVariableDesc struct (API240090) - Reworked validation options (API240089)
- Added
VALIDATION_FLAGS
andD3D12_VALIDATION_FLAGS
enums; renamedD3D11_DEBUG_FLAGS
toD3D11_VALIDATION_FLAGS
- Added
VALIDATION_FLAGS ValidationFlags
andbool EnableValidation
toEngineCreateInfo
- Added
D3D12_VALIDATION_FLAGS D3D12ValidationFlags
toEngineD3D12CreateInfo
; removedEnableDebugLayer
,EnableGPUBasedValidation
,
BreakOnError
,BreakOnCorruption
- Added
VALIDATION_LEVEL
enum andSetValidationLevel()
create info structs' helper functions - Removed
EngineGLCreateInfo::CreateDebugContext
member (it is replaced withEnableValidation
)
- Added
- Added
MtlThreadGroupSizeX
,MtlThreadGroupSizeY
, andMtlThreadGroupSizeZ
members to
DispatchComputeAttribs
andDispatchComputeIndirectAttribs
structs (API Version 240088) - Added InstanceDataStepRate device feature (API Version 240087)
- Added WaveOp device feature (API Version 240086)
- Added UpdateSBT command (API Version 240085)
- Removed
EngineD3D12CreateInfo::NumCommandsToFlushCmdList
andEngineVkCreateInfo::NumCommandsToFlushCmdBuffer
as flushing
the context based on the number of commands is unreasonable (API Version 240084) - Added pipeline resource signatures, enabled inline ray tracing, added indirect draw mesh command (API Version 240083)
- Replaced
IDeviceContext::ExecuteCommandList()
withIDeviceContext::ExecuteCommandLists()
method that takes
an array of command lists instead of one (API Version 240082) - Added
IDeviceObject::SetUserData()
andIDeviceObject::GetUserData()
methods (API Version 240081)
Samples and tutorials
New Tutorial 22 - Hybrid Rendering demonstrates how to implement a simple hybrid renderer that combines rasterization with ray tracing. The tutorial runs on DirectX12, Vulkan and Metal.
Diligent Engine - v2.4.g
API Changes
-
Enabled ray tracing (API Version 240080)
-
Added
IDeviceContext::GetFrameNumber
method (API Version 240079) -
Added
ShaderResourceQueries
device feature andEngineGLCreateInfo::ForceNonSeparablePrograms
parameter (API Version 240078) -
Renamed
USAGE_STATIC
toUSAGE_IMMUTABLE
(API Version 240077) -
Renamed static samplers into immutable samplers (API Version 240076)
- Renamed
StaticSamplerDesc
->ImmutableSamplerDesc
- Renamed
PipelineResourceLayoutDesc::NumStaticSamplers
->PipelineResourceLayoutDesc::NumImmutableSamplers
- Renamed
PipelineResourceLayoutDesc::StaticSamplers
->PipelineResourceLayoutDesc::ImmutableSamplers
- Renamed
-
Refactored pipeline state creation (API Version 240075)
- Replaced
PipelineStateCreateInfo
withGraphicsPipelineStateCreateInfo
andComputePipelineStateCreateInfo
- Replaced
IRenderDevice::CreatePipelineState
withIRenderDevice::CreateGraphicsPipelineState
andIRenderDevice::CreateComputePipelineState
pVS
,pGS
,pHS
,pDS
,pPS
,pAS
,pMS
were moved fromGraphicsPipelineDesc
toGraphicsPipelineStateCreateInfo
GraphicsPipelineDesc GraphicsPipeline
was moved fromPipelineStateDesc
toGraphicsPipelineStateCreateInfo
pCS
is now a member ofComputePipelineStateCreateInfo
,ComputePipelineDesc
was removed- Added
IPipelineState::GetGraphicsPipelineDesc
method
Old API for graphics pipeline initialization:
PipelineStateCreateInfo PSOCreateInfo; PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; PSODesc.GraphicsPipeline.pVS = pVS; PSODesc.GraphicsPipeline.pPS = pVS; // ... Device->CreatePipelineState(PSOCreateInfo, &pPSO);
New API for graphics pipeline initialization:
GraphicsPipelineStateCreateInfo PSOCreateInfo; // ... PSOCreateInfo.pVS = pVS; PSOCreateInfo.pPS = pVS; Device->CreateGraphicsPipelineState(PSOCreateInfo, &pPSO);
Old API for compute pipeline initialization:
PipelineStateCreateInfo PSOCreateInfo; PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc; PSODesc.ComputePipeline.pCS = pCS; // ... Device->CreatePipelineState(PSOCreateInfo, &pPSO);
New API for compute pipeline initialization:
ComputePipelineStateCreateInfo PSOCreateInfo; PSOCreateInfo.pCS = pCS; Device->CreateComputePipelineState(PSOCreateInfo, &pPSO);
- Replaced
-
Added
ShaderInt8
,ResourceBuffer8BitAccess
, andUniformBuffer8BitAccess
device features. (API Version 240074) -
Added
ShaderFloat16
,ResourceBuffer16BitAccess
,UniformBuffer16BitAccess
, andShaderInputOutput16
device features. (API Version 240073)
Samples and Tutorials
- Added Tutorial21 - Ray Tracing
Diligent Engine - v2.4.f
API Changes
- Added
UnifiedMemoryCPUAccess
member toGraphicsAdapterInfo
struct (API Version 240072)- An application should check allowed unified memory access types before creating unified buffers
- Added GPU vendor and memory size detection (API Version 240071)
- Added
ADAPTER_VENDOR
enum - Added
GraphicsAdapterInfo
struct - Added
GraphicsAdapterInfo AdapterInfo
member toDeviceCaps
struct - Removed
ADAPTER_TYPE AdaterType
fromDeviceCaps
struct
- Added
- Reworked texture format properties (API Version 240070)
- Added
RESOURCE_DIMENSION_SUPPORT
enum - Reworked
TextureFormatInfoExt
struct
- Added
- Added option to disable/enable device features during initialization (API Version 240069)
- Added
DEVICE_FEATURE_STATE
enum - Changed the types of members of
DeviceFeatures
struct from bool toDEVICE_FEATURE_STATE
- Added
DeviceFeatures Features
member toEngineCreateInfo
struct
- Added
- Enabled mesh shaders (API Version 240068)
- Added
PIPELINE_TYPE
enum - Replaced
IsComputePipline
member ofPipelineStateDesc
struct withPIPELINE_TYPE PipelineType
- Added new mesh shader types
- Added mesh shader draw commands
- Added
- Added
QUERY_TYPE_DURATION
query type (API Version 240067) - Added
USAGE_UNIFIED
usage type (API Version 240066) - Added render passes (API Version 240065)
- Added
CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS
enum andIShaderSourceInputStreamFactory::CreateInputStream2
method (API Version 240064) - Added
ISwapChain::SetMaximumFrameLatency
function (API Version 240061) - Added
EngineGLCreateInfo::CreateDebugContext
member (API Version 240060) - Added
SHADER_SOURCE_LANGUAGE_GLSL_VERBATIM
value (API Version 240059). - Added
GLBindTarget
parameter toIRenderDeviceGL::CreateTextureFromGLHandle
method (API Version 240058).
Samples and Tutorials
- Added HelloAR Android sample
- Added Tutorial19 - Render Passes
- Added Tutorial20 - Mesh Shader
Diligent Engine - v2.4.e
- Enabled Vulkan on Android
- Added C Interface
API Changes
- Added
PreTransform
parameter to swap chain description - Added
PipelineStateCreateInfo
struct that is now taken byIRenderDevice::CreatePipelineState
instead ofPipelineStateDesc
struct. AddedPSO_CREATE_FLAGS
enum - Updated swap chain creation functions to use
NativeWindow
- Added
NativeWindow
wrapper and replacedpNativeWndHandle
andpDisplay
members with it inEngineGLCreateInfo