A modern cross-platform low-level graphics library and rendering framework
This release packs a lot of new features and improvements.
MultiDraw
and MultiDrawIndexed
commands (API254006)SerializationDeviceGLInfo
struct (API254005)
ValidateShaders
member allows disabling time-consuming shader compilationAnisotropicFilteringSupported
member of SamplerProperties
struct with MaxAnisotropy
(API254004)TextureSubresourceViews
device feature (API254003)DeviceContextStats
structIDeviceContext::ClearStats
and IDeviceContext::GetStats
methodsIDeviceContext::TransitionShaderResources
: removed unused pPipelineState
parameter (API254001)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.
ShaderMacroArray
struct (API253011)
Macros
member of ShaderCreateInfo
struct is now of type ShaderMacroArray
ResourceMappingDesc
with ResourceMappingCreateInfo
(API253010)
ResourceMappingCreateInfo::NumEntries
to define the number of entries instead of the trailing null entryShaderCreateInfo::ppConversionStream
(API253009)ppCompilerOutput
member of the ShaderCreateInfo
struct and added it as parameter to the IRenderDevice::CreateShader
method (API253008)IPipelineStateGL::GetGLProgramHandle
and IShaderGL::GetGLShaderHandle
methods (API253007)TEXTURE_VIEW_READ_ONLY_DEPTH_STENCIL
view typeUseReadOnlyDSV
member to GraphicsPipelineDesc
structPSO_CACHE_FLAGS
enum and PipelineStateCacheDesc::Flags
member (API253005)RenderDeviceShaderVersionInfo
struct and RenderDeviceInfo::MaxShaderVersion
member (API253003)TEXTURE_COMPONENT_SWIZZLE
enum and TextureComponentMapping
structSwizzle
member to TextureViewDesc
structTextureComponentSwizzle
member to DeviceFeatures
structSHADER_CODE_BASIC_TYPE
and SHADER_CODE_VARIABLE_CLASS
enumsShaderCodeVariableDesc
and ShaderCodeBufferDesc
structsIShader::GetConstantBufferDesc
methodThis 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.
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.
RENDER_STATE_CACHE_LOG_LEVEL
enum, replaced EnableLogging
member of RenderStateCacheCreateInfo
struct with LoggingLevel
(API252009)IPipelineResourceSignature::CopyStaticResources
and IPipelineState::CopyStaticResources
methods (API252008)IRenderStateCache
interface and related data types) (API252007)UseCombinedTextureSamplers
and CombinedSamplerSuffix
members from ShaderCreateInfo
to ShaderDesc
(API252006)IntanceLayerCount
and ppInstanceLayerNames
members to EngineVkCreateInfo struct (API252005)IgnoreDebugMessageCount
and ppIgnoreDebugMessageNames
to EngineVkCreateInfo
struct (API252004)IDeviceObjectArchive
and IArchive
; enabled dearchiver
to load multiple archives to allow storing signatures and pipelines separately) (API252003)SET_SHADER_RESOURCES_FLAGS
enum and Flags
parameter to IShaderResourceVariable::Set
and IShaderResourceVariable::SetArray
methods (API252002)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.
This release introduces the following major features:
TransferQueueTimestampQueries
feature (API Version 250005)RESOURCE_STATE_COMMON
state; added STATE_TRANSITION_FLAGS
enum and replaced
StateTransitionDesc::UpdateResourceState
with STATE_TRANSITION_FLAGS Flags
(API Version 250004)ComputeShaderProperties
struct (API Version 250003)IShaderResourceBinding::CheckResources
method and SHADER_RESOURCE_VARIABLE_TYPE_FLAGS
enum (API Version 250002)IShaderResourceVariable::IsBound
with IShaderResourceVariable::Get
(API Version 250001)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.
A major release that introduces a number of significant improvements:
MISC_TEXTURE_FLAG_MEMORYLESS
flag (API Version 250000)RayTracing2
device feature and added RAY_TRACING_CAP_FLAGS
enum (API Version 240099)PIPELINE_TYPE_TILE
and SHADER_TYPE_TILE
enum valuesTileShaders
device featureTilePipelineDesc
, TilePipelineStateCreateInfo
and DispatchTileAttribs
structsIRenderDevice::CreateTilePipelineState
, IPipelineState::GetTilePipelineDesc
,
IDeviceContext::DispatchTile
and IDeviceContext::GetTileSize
methodsGetNextFenceValue
, GetCompletedFenceValue
, and IsFenceSignaled
methods from IRenderDeviceD3D12
and IRenderDeviceVk
interfaces
as they are now in ICommandQueue
interface (API Version 240097)ICommandQueue
interface, IDeviceContext::LockCommandQueue
and IDeviceContext::UnlockCommandQueue
methods,
removed fence query methods from IRenderDeviceVk
, IRenderDeviceD3D12
, and IRenderDeviceMtl
(API Version 240096)CommandQueueMask
member of TextureDesc
, BufferDesc
, PipelineStateDesc
, TopLevelASDesc
,
and BottomLevelASDesc
, was renamed to ImmediateContextMask
pContext
member to TextureData
and BufferData
structs to indicate which context to
use for initialization.GetDeviceCaps
and GetDeviceProperties
IDeviceContext
methods and added
GetDeviceInfo
and GetAdapterInfo
methods; added RenderDeviceInfo
struct.SamplerCaps
to SamplerProperties,
TextureCapsto
TextureProperties; added
BufferProperties,
RayTracingProperties, and
MeshShaderProperties` structsDeviceLimits
structDeviceCaps
struct and moved its members to GraphicsAdapterInfo
and RenderDeviceInfo
structsNativeFence
to DeviceFeatures
CommandQueueInfo
structCOMMAND_QUEUE_TYPE
and QUEUE_PRIORITY
enumsShaderVersion
struct to Version
GraphicsAdapterInfo
structImmediateContextCreateInfo
struct and pImmediateContextInfo
, NumImmediateContexts
members to EngineCreateInfo
structAdapterId
and GraphicsAPIVersion
members to EngineCreateInfo
structDIRECT3D_FEATURE_LEVEL
enumFENCE_TYPE
enumIFence::Reset
to IFence::Signal
; added IFence::Wait
methodIEngineFactory::EnumerateAdapters
methodDeviceContextDesc
struct and IDeviceContext::GetDesc
methodIDeviceContext::Begin
method, renamed IDeviceContext::SignalFence
to IDeviceContext::EnqueueSignal
IDeviceContext::BeginDebugGroup
, IDeviceContext::EndDebugGroup
,
IDeviceContext::InsertDebugLabel
(API Version 240095)DefaultVariableMergeStages
member to PipelineResourceLayoutDesc
struct (API240094)IShaderResourceVariable::SetBufferRange
and IShaderResourceVariable::SetBufferOffset
methods,
added DeviceLimits
struct (API240093)MEMORY_PROPERTIES
enum, IBuffer::GetMemoryProperties()
, IBuffer::FlushMappedRange()
,
and IBuffer::InvalidateMappedRange()
methods (API240092)IDeviceContext::SetUserData()
and IDeviceContext::GetUserData()
methods (API240091)SHADER_VARIABLE_FLAGS
enum and SHADER_VARIABLE_FLAGS Flags
member to ShaderResourceVariableDesc struct (API240090)VALIDATION_FLAGS
and D3D12_VALIDATION_FLAGS
enums; renamed D3D11_DEBUG_FLAGS
to D3D11_VALIDATION_FLAGS
VALIDATION_FLAGS ValidationFlags
and bool EnableValidation
to EngineCreateInfo
D3D12_VALIDATION_FLAGS D3D12ValidationFlags
to EngineD3D12CreateInfo
; removed EnableDebugLayer
, EnableGPUBasedValidation
,
BreakOnError
, BreakOnCorruption
VALIDATION_LEVEL
enum and SetValidationLevel()
create info structs' helper functionsEngineGLCreateInfo::CreateDebugContext
member (it is replaced with EnableValidation
)MtlThreadGroupSizeX
, MtlThreadGroupSizeY
, and MtlThreadGroupSizeZ
members to
DispatchComputeAttribs
and DispatchComputeIndirectAttribs
structs (API Version 240088)EngineD3D12CreateInfo::NumCommandsToFlushCmdList
and EngineVkCreateInfo::NumCommandsToFlushCmdBuffer
as flushing
the context based on the number of commands is unreasonable (API Version 240084)IDeviceContext::ExecuteCommandList()
with IDeviceContext::ExecuteCommandLists()
method that takes
an array of command lists instead of one (API Version 240082)IDeviceObject::SetUserData()
and IDeviceObject::GetUserData()
methods (API Version 240081)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.
Enabled ray tracing (API Version 240080)
Added IDeviceContext::GetFrameNumber
method (API Version 240079)
Added ShaderResourceQueries
device feature and EngineGLCreateInfo::ForceNonSeparablePrograms
parameter (API Version 240078)
Renamed USAGE_STATIC
to USAGE_IMMUTABLE
(API Version 240077)
Renamed static samplers into immutable samplers (API Version 240076)
StaticSamplerDesc
-> ImmutableSamplerDesc
PipelineResourceLayoutDesc::NumStaticSamplers
-> PipelineResourceLayoutDesc::NumImmutableSamplers
PipelineResourceLayoutDesc::StaticSamplers
-> PipelineResourceLayoutDesc::ImmutableSamplers
Refactored pipeline state creation (API Version 240075)
PipelineStateCreateInfo
with GraphicsPipelineStateCreateInfo
and ComputePipelineStateCreateInfo
IRenderDevice::CreatePipelineState
with IRenderDevice::CreateGraphicsPipelineState
and IRenderDevice::CreateComputePipelineState
pVS
, pGS
, pHS
, pDS
, pPS
, pAS
, pMS
were moved from GraphicsPipelineDesc
to GraphicsPipelineStateCreateInfo
GraphicsPipelineDesc GraphicsPipeline
was moved from PipelineStateDesc
to GraphicsPipelineStateCreateInfo
pCS
is now a member of ComputePipelineStateCreateInfo
, ComputePipelineDesc
was removedIPipelineState::GetGraphicsPipelineDesc
methodOld 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);
Added ShaderInt8
, ResourceBuffer8BitAccess
, and UniformBuffer8BitAccess
device features. (API Version 240074)
Added ShaderFloat16
, ResourceBuffer16BitAccess
, UniformBuffer16BitAccess
, and ShaderInputOutput16
device features. (API Version 240073)
UnifiedMemoryCPUAccess
member to GraphicsAdapterInfo
struct (API Version 240072)
ADAPTER_VENDOR
enumGraphicsAdapterInfo
structGraphicsAdapterInfo AdapterInfo
member to DeviceCaps
structADAPTER_TYPE AdaterType
from DeviceCaps
structRESOURCE_DIMENSION_SUPPORT
enumTextureFormatInfoExt
structDEVICE_FEATURE_STATE
enumDeviceFeatures
struct from bool to DEVICE_FEATURE_STATE
DeviceFeatures Features
member to EngineCreateInfo
structPIPELINE_TYPE
enumIsComputePipline
member of PipelineStateDesc
struct with PIPELINE_TYPE PipelineType
QUERY_TYPE_DURATION
query type (API Version 240067)USAGE_UNIFIED
usage type (API Version 240066)CREATE_SHADER_SOURCE_INPUT_STREAM_FLAGS
enum and IShaderSourceInputStreamFactory::CreateInputStream2
method (API Version 240064)ISwapChain::SetMaximumFrameLatency
function (API Version 240061)EngineGLCreateInfo::CreateDebugContext
member (API Version 240060)SHADER_SOURCE_LANGUAGE_GLSL_VERBATIM
value (API Version 240059).GLBindTarget
parameter to IRenderDeviceGL::CreateTextureFromGLHandle
method (API Version 240058).API Changes
PreTransform
parameter to swap chain descriptionPipelineStateCreateInfo
struct that is now taken by IRenderDevice::CreatePipelineState
instead of PipelineStateDesc
struct. Added PSO_CREATE_FLAGS
enumNativeWindow
NativeWindow
wrapper and replaced pNativeWndHandle
and pDisplay
members with it in EngineGLCreateInfo
Full release notes