summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-10-03 04:14:03 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-10-03 04:14:03 +0000
commit2f344b7eb5527b2449f1ad0dc2a9e42ac2542b76 (patch)
treec913e8d0b7343cab19de6f1643564e30f89b77b9 /Graphics/GraphicsEngine
parentMetal interface: using id<> instead of void* (diff)
downloadDiligentCore-2f344b7eb5527b2449f1ad0dc2a9e42ac2542b76.tar.gz
DiligentCore-2f344b7eb5527b2449f1ad0dc2a9e42ac2542b76.zip
Added device features to indicate support of 16-bit types
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/APIInfo.h2
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h23
2 files changed, 22 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h
index 8856ee6b..d47c9a70 100644
--- a/Graphics/GraphicsEngine/interface/APIInfo.h
+++ b/Graphics/GraphicsEngine/interface/APIInfo.h
@@ -30,7 +30,7 @@
/// \file
/// Diligent API information
-#define DILIGENT_API_VERSION 240072
+#define DILIGENT_API_VERSION 240073
#include "../../../Primitives/interface/BasicTypes.h"
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index e8263232..24440ca8 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -1583,6 +1583,21 @@ struct DeviceFeatures
/// Specifies whether all the extended UAV texture formats are available in shader code.
DEVICE_FEATURE_STATE TextureUAVExtendedFormats DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
+ /// Indicates if device supports native 16-bit float operations. Note that there are separate features
+ /// that indicate if device supports loading 16-bit floats from buffers and passing them between shader stages.
+ DEVICE_FEATURE_STATE ShaderFloat16 DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
+
+ /// Indicates if device supports reading and writing 16-bit floats and ints from buffers bound
+ /// as shader resource or unordered access views.
+ DEVICE_FEATURE_STATE ResourceBuffer16BitAccess DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
+
+ /// Indicates if device supports reading 16-bit floats and ints from uniform buffers.
+ DEVICE_FEATURE_STATE UniformBuffer16BitAccess DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
+
+ /// Indicates if 16-bit floats and ints can be used as input/output of a shader entry point.
+ DEVICE_FEATURE_STATE ShaderInputOutput16 DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED);
+
+
#if DILIGENT_CPP_INTERFACE
DeviceFeatures() noexcept {}
@@ -1609,10 +1624,14 @@ struct DeviceFeatures
TextureCompressionBC {State},
VertexPipelineUAVWritesAndAtomics {State},
PixelUAVWritesAndAtomics {State},
- TextureUAVExtendedFormats {State}
+ TextureUAVExtendedFormats {State},
+ ShaderFloat16 {State},
+ ResourceBuffer16BitAccess {State},
+ UniformBuffer16BitAccess {State},
+ ShaderInputOutput16 {State}
{
# if defined(_MSC_VER) && defined(_WIN64)
- static_assert(sizeof(*this) == 23, "Did you add a new feature to DeviceFeatures? Please handle its satus above.");
+ static_assert(sizeof(*this) == 27, "Did you add a new feature to DeviceFeatures? Please handle its status above.");
# endif
}
#endif