From a09d692eabba70d5f79db99918faa7eace93eddf Mon Sep 17 00:00:00 2001 From: assiduous Date: Sat, 3 Oct 2020 19:04:44 -0700 Subject: Added device features to inidicate 8-bit types support (API240074) --- Graphics/GraphicsEngine/interface/APIInfo.h | 2 +- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 17 +++++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h index d47c9a70..a7596e3f 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 240073 +#define DILIGENT_API_VERSION 240074 #include "../../../Primitives/interface/BasicTypes.h" diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index 69769968..b681c498 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1600,6 +1600,16 @@ struct DeviceFeatures /// 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); + /// Indicates if device supports native 8-bit integer operations. + DEVICE_FEATURE_STATE ShaderInt8 DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); + + /// Indicates if device supports reading and writing 8-bit types from buffers bound + /// as shader resource or unordered access views. + DEVICE_FEATURE_STATE ResourceBuffer8BitAccess DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); + + /// Indicates if device supports reading 8-bit types from uniform buffers. + DEVICE_FEATURE_STATE UniformBuffer8BitAccess DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); + #if DILIGENT_CPP_INTERFACE DeviceFeatures() noexcept {} @@ -1631,10 +1641,13 @@ struct DeviceFeatures ShaderFloat16 {State}, ResourceBuffer16BitAccess {State}, UniformBuffer16BitAccess {State}, - ShaderInputOutput16 {State} + ShaderInputOutput16 {State}, + ShaderInt8 {State}, + ResourceBuffer8BitAccess {State}, + UniformBuffer8BitAccess {State} { # if defined(_MSC_VER) && defined(_WIN64) - static_assert(sizeof(*this) == 27, "Did you add a new feature to DeviceFeatures? Please handle its status above."); + static_assert(sizeof(*this) == 30, "Did you add a new feature to DeviceFeatures? Please handle its status above."); # endif } #endif -- cgit v1.2.3