summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-10-20 01:54:45 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-10-20 01:54:45 +0000
commit7d27dcd7dc3d6a990a106e95e254009176e7ee53 (patch)
tree39e2df8b4f0a25a0c4b3238de6672cf769db2818 /Graphics/GraphicsEngine
parentD3D backends: properly handling the issue with static sampler arrays in shade... (diff)
downloadDiligentCore-7d27dcd7dc3d6a990a106e95e254009176e7ee53.tar.gz
DiligentCore-7d27dcd7dc3d6a990a106e95e254009176e7ee53.zip
Added HLSLVersion, GLSLVersion and GLESSLVersion to ShaderCreateInfo struct (API Version 240035)
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/APIInfo.h2
-rw-r--r--Graphics/GraphicsEngine/interface/Shader.h36
2 files changed, 37 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngine/interface/APIInfo.h b/Graphics/GraphicsEngine/interface/APIInfo.h
index 0979a824..36cb5c36 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 240034
+#define DILIGENT_API_VERSION 240035
#include "../../../Primitives/interface/BasicTypes.h"
diff --git a/Graphics/GraphicsEngine/interface/Shader.h b/Graphics/GraphicsEngine/interface/Shader.h
index d6eca935..257ff4fe 100644
--- a/Graphics/GraphicsEngine/interface/Shader.h
+++ b/Graphics/GraphicsEngine/interface/Shader.h
@@ -174,6 +174,42 @@ struct ShaderCreateInfo
/// Shader source language. See Diligent::SHADER_SOURCE_LANGUAGE.
SHADER_SOURCE_LANGUAGE SourceLanguage = SHADER_SOURCE_LANGUAGE_DEFAULT;
+
+ /// Shader version
+ struct ShaderVersion
+ {
+ /// Major revision
+ Uint8 Major = 0;
+
+ /// Minor revision
+ Uint8 Minor = 0;
+
+ ShaderVersion()noexcept{}
+ ShaderVersion(Uint8 _Major, Uint8 _Minor)noexcept :
+ Major {_Major},
+ Minor {_Minor}
+ {}
+ };
+
+ /// HLSL shader model to use when compiling the shader. When default value
+ /// is given (0, 0), the engine will attempt to use the highest HLSL shader model
+ /// supported by the device. If the shader is created from the byte code, this value
+ /// has no effect.
+ ///
+ /// \note When HLSL source is converted to GLSL, corresponding GLSL/GLESSL version will be used.
+ ShaderVersion HLSLVersion = ShaderVersion{};
+
+ /// GLSL version to use when creating the shader. When default value
+ /// is given (0, 0), the engine will attempt to use the highest GLSL version
+ /// supported by the device.
+ ShaderVersion GLSLVersion = ShaderVersion{};
+
+ /// GLES shading language version to use when creating the shader. When default value
+ /// is given (0, 0), the engine will attempt to use the highest GLESSL version
+ /// supported by the device.
+ ShaderVersion GLESSLVersion = ShaderVersion{};
+
+
/// Memory address where pointer to the compiler messages data blob will be written
/// The buffer contains two null-terminated strings. The first one is the compiler