diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-10-21 01:05:02 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-10-21 01:05:02 +0000 |
| commit | b9d1a84943f61d1b48ffb1847cd0b3f7b8c60fb2 (patch) | |
| tree | 41fbdec950b17f7d8f833b0fa0c5be0a4a005344 /Graphics/GraphicsEngine | |
| parent | Improved exception safety of SRB object creation (diff) | |
| download | DiligentCore-b9d1a84943f61d1b48ffb1847cd0b3f7b8c60fb2.tar.gz DiligentCore-b9d1a84943f61d1b48ffb1847cd0b3f7b8c60fb2.zip | |
Added ShaderResourceQueries device feature and EngineGLCreateInfo::ForceNonSeparablePrograms parameter (API 240078)
Diffstat (limited to 'Graphics/GraphicsEngine')
| -rw-r--r-- | Graphics/GraphicsEngine/interface/APIInfo.h | 2 | ||||
| -rw-r--r-- | Graphics/GraphicsEngine/interface/GraphicsTypes.h | 19 |
2 files changed, 19 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h index 327f54c7..0ecbd92b 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 240077 +#define DILIGENT_API_VERSION 240078 #include "../../../Primitives/interface/BasicTypes.h" diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index 0f6b4b82..b05519c5 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1515,6 +1515,17 @@ struct DeviceFeatures /// Indicates if device supports separable programs DEVICE_FEATURE_STATE SeparablePrograms DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); + /// Indicates if device supports resource queries from shader objects. + + /// \ note This feature indicates if IShader::GetResourceCount() and IShader::GetResourceDesc() methods + /// can be used to query the list of resources of individual shader objects. + /// Shader variable queries from pipeline state and shader resource binding objects are always + /// available. + /// + /// The feature is always enabled in Direct3D11, Direct3D12 and Vulkan. It is enabled in + /// OpenGL when separable programs are available, and it is always disabled in Metal. + DEVICE_FEATURE_STATE ShaderResourceQueries DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); + /// Indicates if device supports indirect draw commands DEVICE_FEATURE_STATE IndirectRendering DEFAULT_INITIALIZER(DEVICE_FEATURE_STATE_DISABLED); @@ -1616,6 +1627,7 @@ struct DeviceFeatures explicit DeviceFeatures(DEVICE_FEATURE_STATE State) noexcept : SeparablePrograms {State}, + ShaderResourceQueries {State}, IndirectRendering {State}, WireframeFill {State}, MultithreadedResourceCreation {State}, @@ -1647,7 +1659,7 @@ struct DeviceFeatures UniformBuffer8BitAccess {State} { # if defined(_MSC_VER) && defined(_WIN64) - static_assert(sizeof(*this) == 30, "Did you add a new feature to DeviceFeatures? Please handle its status above."); + static_assert(sizeof(*this) == 31, "Did you add a new feature to DeviceFeatures? Please handle its status above."); # endif } #endif @@ -1875,6 +1887,11 @@ struct EngineGLCreateInfo DILIGENT_DERIVE(EngineCreateInfo) /// provide additional runtime checking, validation, and logging /// functionality while possibly incurring performance penalties bool CreateDebugContext DEFAULT_INITIALIZER(false); + + /// Force using non-separable programs. + + /// Setting this to true is typically needed for testing purposes only. + bool ForceNonSeparablePrograms DEFAULT_INITIALIZER(false); }; typedef struct EngineGLCreateInfo EngineGLCreateInfo; |
