summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-17 04:06:08 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-17 04:06:08 +0000
commitbc4a29a1fac0276e499bb37bb3c449ebdcacbe92 (patch)
tree50316f6b243300fdf9ef25afe1aad5d619ccfa08 /Graphics/GraphicsEngine
parentAdded option to install PDB files on Windows (closed https://github.com/Dilig... (diff)
downloadDiligentCore-bc4a29a1fac0276e499bb37bb3c449ebdcacbe92.tar.gz
DiligentCore-bc4a29a1fac0276e499bb37bb3c449ebdcacbe92.zip
A bunch of updates to specify minimum feature level for D3D11/D3D12 backends and to enable bindless mode (API version 240032)
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/APIInfo.h2
-rw-r--r--Graphics/GraphicsEngine/interface/DeviceCaps.h13
-rw-r--r--Graphics/GraphicsEngine/interface/GraphicsTypes.h33
-rw-r--r--Graphics/GraphicsEngine/interface/Shader.h11
4 files changed, 41 insertions, 18 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h
index aae4bdaa..2d7d66f5 100644
--- a/Graphics/GraphicsEngine/interface/APIInfo.h
+++ b/Graphics/GraphicsEngine/interface/APIInfo.h
@@ -26,7 +26,7 @@
/// \file
/// Diligent API information
-#define DILIGENT_API_VERSION 240031
+#define DILIGENT_API_VERSION 240032
#include "../../../Primitives/interface/BasicTypes.h"
diff --git a/Graphics/GraphicsEngine/interface/DeviceCaps.h b/Graphics/GraphicsEngine/interface/DeviceCaps.h
index 4e20c917..26914169 100644
--- a/Graphics/GraphicsEngine/interface/DeviceCaps.h
+++ b/Graphics/GraphicsEngine/interface/DeviceCaps.h
@@ -83,12 +83,14 @@ namespace Diligent
/// Device type. See Diligent::DeviceType.
DeviceType DevType = DeviceType::Undefined;
- /// Major API revision. For instance, for D3D11.2 this value would be 11,
- /// and for OpenGL4.3 this value would be 4.
+ /// Major revision of the graphics API supported by the graphics adapter.
+ /// Note that this value indicates the maximum supported feature level, so,
+ /// for example, if the device type is D3D11, this value will be 10 when
+ /// the maximum supported Direct3D feature level of the graphics adapter is 10.0.
Int32 MajorVersion = 0;
- /// Major API revision. For instance, for D3D11.2 this value would be 2,
- /// and for OpenGL4.3 this value would be 3.
+ /// Minor revision of the graphics API supported by the graphics adapter.
+ /// Similar to MajorVersion, this value indicates the maximum supported feature level.
Int32 MinorVersion = 0;
/// Indicates if device supports separable programs
@@ -112,6 +114,9 @@ namespace Diligent
/// Indicates if device supports tessellation
Bool bTessellationSupported = True;
+ /// Indicates if device supports bindless resources
+ Bool bBindlessSupported = False;
+
/// Texture sampling capabilities. See Diligent::SamplerCaps.
SamplerCaps SamCaps;
diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
index 61b79064..d7af003b 100644
--- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h
+++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h
@@ -1321,14 +1321,40 @@ namespace Diligent
VerifyCommittedResourceRelevance = 0x02
};
+
+ /// Direct3D11/12 feature level
+ enum DIRECT3D_FEATURE_LEVEL : Uint8
+ {
+ /// Feature level 10.0
+ DIRECT3D_FEATURE_LEVEL_10_0,
+
+ /// Feature level 10.1
+ DIRECT3D_FEATURE_LEVEL_10_1,
+
+ /// Feature level 11.0
+ DIRECT3D_FEATURE_LEVEL_11_0,
+
+ /// Feature level 11.1
+ DIRECT3D_FEATURE_LEVEL_11_1,
+
+ /// Feature level 12.0
+ DIRECT3D_FEATURE_LEVEL_12_0,
+
+ /// Feature level 12.1
+ DIRECT3D_FEATURE_LEVEL_12_1
+ };
+
/// Attributes specific to D3D11 engine
struct EngineD3D11CreateInfo : public EngineCreateInfo
{
static constexpr Uint32 DefaultAdapterId = 0xFFFFFFFF;
- /// Id of the hardware adapter the engine should be initialized on
+ /// Id of the hardware adapter the engine should be initialized on.
Uint32 AdapterId = DefaultAdapterId;
+ /// Minimum required Direct3D feature level.
+ DIRECT3D_FEATURE_LEVEL MinimumFeatureLevel = DIRECT3D_FEATURE_LEVEL_11_0;
+
/// Debug flags. See Diligent::EngineD3D11DebugFlags for a list of allowed values.
///
/// \sa CreateDeviceAndContextsD3D11Type, CreateSwapChainD3D11Type, LoadGraphicsEngineD3D11
@@ -1348,9 +1374,12 @@ namespace Diligent
{
static constexpr Uint32 DefaultAdapterId = 0xFFFFFFFF;
- /// Id of the hardware adapter the engine should be initialized on
+ /// Id of the hardware adapter the engine should be initialized on.
Uint32 AdapterId = DefaultAdapterId;
+ /// Minimum required Direct3D feature level.
+ DIRECT3D_FEATURE_LEVEL MinimumFeatureLevel = DIRECT3D_FEATURE_LEVEL_11_0;
+
/// Enable Direct3D12 debug layer.
bool EnableDebugLayer = false;
diff --git a/Graphics/GraphicsEngine/interface/Shader.h b/Graphics/GraphicsEngine/interface/Shader.h
index c88e88fe..d6eca935 100644
--- a/Graphics/GraphicsEngine/interface/Shader.h
+++ b/Graphics/GraphicsEngine/interface/Shader.h
@@ -50,15 +50,6 @@ enum SHADER_TYPE : Uint32
};
DEFINE_FLAG_ENUM_OPERATORS(SHADER_TYPE);
-enum SHADER_PROFILE : Uint8
-{
- SHADER_PROFILE_DEFAULT = 0,
- SHADER_PROFILE_DX_4_0,
- SHADER_PROFILE_DX_5_0,
- SHADER_PROFILE_DX_5_1,
- SHADER_PROFILE_GL_4_2
-};
-
/// Describes shader source code language
enum SHADER_SOURCE_LANGUAGE : Uint32
{
@@ -77,8 +68,6 @@ struct ShaderDesc : DeviceObjectAttribs
{
/// Shader type. See Diligent::SHADER_TYPE.
SHADER_TYPE ShaderType = SHADER_TYPE_VERTEX;
-
- SHADER_PROFILE TargetProfile = SHADER_PROFILE_DEFAULT;
};