summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-02-10 03:45:10 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:31:35 +0000
commit07a4792c57e3617d1aa43c9fc3d98ff85107c350 (patch)
tree1b7fb7b2eaa7a1f7e18b34dab220a690b2917e3a /Graphics/GraphicsEngine
parentFixed minor issue with format validation and GetPipelineResourceFlagsString test (diff)
downloadDiligentCore-07a4792c57e3617d1aa43c9fc3d98ff85107c350.tar.gz
DiligentCore-07a4792c57e3617d1aa43c9fc3d98ff85107c350.zip
Vk backend: some minor updates + comments
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h9
-rw-r--r--Graphics/GraphicsEngine/interface/PipelineResourceSignature.h2
-rw-r--r--Graphics/GraphicsEngine/interface/PipelineState.h12
3 files changed, 15 insertions, 8 deletions
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index fff9ca2a..5e236134 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -1644,10 +1644,11 @@ struct DeviceFeatures
/// Indicates if device supports reading 8-bit types from uniform buffers.
DEVICE_FEATURE_STATE UniformBuffer8BitAccess DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
- /// Indicates if device supports runtime-sized arrays in shader.
- /// DirectX 12 backend already supports this feature,
- /// Vulkan backend has optional support,
- /// other backends are does not support this feature.
+ /// Indicates if device supports runtime-sized shader arrays (e.g. arrays without a specific size).
+ ///
+ /// \remarks This feature is always enabled in DirectX12 backend and
+ /// can optionally be enabled in Vulkan backend.
+ /// Run-time sized shader arrays are not available in other backends.
DEVICE_FEATURE_STATE ShaderResourceRuntimeArray DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
diff --git a/Graphics/GraphicsEngine/interface/PipelineResourceSignature.h b/Graphics/GraphicsEngine/interface/PipelineResourceSignature.h
index a501a27c..05feb54f 100644
--- a/Graphics/GraphicsEngine/interface/PipelineResourceSignature.h
+++ b/Graphics/GraphicsEngine/interface/PipelineResourceSignature.h
@@ -108,7 +108,7 @@ DILIGENT_TYPED_ENUM(PIPELINE_RESOURCE_FLAGS, Uint8)
/// PIPELINE_RESOURCE_FLAG_FORMATTED_BUFFER flag.
PIPELINE_RESOURCE_FLAG_FORMATTED_BUFFER = 0x04,
- /// DirectX 12 only - runtime sized array must be in separate space.
+ /// Indicates that resource is a run-time sized shader array (e.g. an array without a specific size).
PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY = 0x08,
PIPELINE_RESOURCE_FLAG_LAST = PIPELINE_RESOURCE_FLAG_RUNTIME_ARRAY
diff --git a/Graphics/GraphicsEngine/interface/PipelineState.h b/Graphics/GraphicsEngine/interface/PipelineState.h
index dedeee9a..d8d765c1 100644
--- a/Graphics/GraphicsEngine/interface/PipelineState.h
+++ b/Graphics/GraphicsEngine/interface/PipelineState.h
@@ -593,9 +593,15 @@ DILIGENT_BEGIN_INTERFACE(IPipelineState, IDeviceObject)
/// The function only checks compatibility of shader resource layouts. It does not take
/// into account vertex shader input layout, number of outputs, etc.
///
- /// \remarks On Vulkan backend PSO may be partially compatible, on other backends this behavior is emulated.
- /// For Vulkan changing PSO between totally or partially compatible may increase performance,
- /// for DirectX 12 only changing PSO between compatible may increase performance.
+ /// *Technical details*
+ ///
+ /// PSOs may be partially compatible when some, but not all pipeline resource signatures are compatible.
+ /// In Vulkan backend, switching PSOs that are partially compatible may increase performance
+ /// as shader resource bindings (that map to descriptor sets) from compatible signatures may be preserved.
+ /// In Direct3D12 backend, only switching between fully compatible PSOs preserves shader resource bindings,
+ /// while switching partially compatible PSOs still requires re-binding all resource bindigns from all signatures.
+ /// In other backends the behavior is emualted. Usually, the bindigs from the first N compatible resource signatures
+ /// may be preserved.
VIRTUAL bool METHOD(IsCompatibleWith)(THIS_
const struct IPipelineState* pPSO) CONST PURE;