From 1313de1ab167fe67d14fa2a848946f442491ca11 Mon Sep 17 00:00:00 2001 From: azhirnov Date: Tue, 25 Aug 2020 04:56:42 +0300 Subject: 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 --- Graphics/GraphicsEngineOpenGL/src/ShaderGLImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') 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); -- cgit v1.2.3