diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-08-25 01:56:42 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-08-25 01:56:42 +0000 |
| commit | 1313de1ab167fe67d14fa2a848946f442491ca11 (patch) | |
| tree | a87dad429e9a639b5403d0c923ca2d35b610479c /Graphics/GraphicsEngineOpenGL | |
| parent | added AdapterId to Vulkan backend (diff) | |
| download | DiligentCore-1313de1ab167fe67d14fa2a848946f442491ca11.tar.gz DiligentCore-1313de1ab167fe67d14fa2a848946f442491ca11.zip | |
added HLSLTools, HLSL shader compiler refactoring
added ShaderCompiler field to ShaderCreateInfo,
fixed tests that doesn't compile on DXC,
added dxc/WinAdapter.h to fix compilation on linux
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp index bfa28b88..01266f1d 100644 --- a/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp @@ -53,6 +53,10 @@ ShaderGLImpl::ShaderGLImpl(IReferenceCounters* pRefCounters, m_GLShaderObj{true, GLObjectWrappers::GLShaderObjCreateReleaseHelper{GetGLShaderType(m_Desc.ShaderType)}} // clang-format on { + DEV_CHECK_ERR(CreationAttribs.ByteCode == nullptr, "'ByteCode' must be null when shader is created from the source code or a file"); + DEV_CHECK_ERR(CreationAttribs.ByteCodeSize == 0, "'ByteCodeSize' must be 0 when shader is created from the source code or a file"); + DEV_CHECK_ERR(CreationAttribs.ShaderCompiler == SHADER_COMPILER_DEFAULT, "only default compiler supported on OpenGL"); + const auto& deviceCaps = pDeviceGL->GetDeviceCaps(); auto GLSLSource = BuildGLSLSourceString(CreationAttribs, deviceCaps, TargetGLSLCompiler::driver); |
