summaryrefslogtreecommitdiffstats
path: root/Graphics/GLSLTools
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2019-12-13 18:03:15 +0000
committerassiduous <assiduous@diligentgraphics.com>2019-12-13 18:03:15 +0000
commit996bfb53528aeaaba532413bf1848a0ebc3b03f0 (patch)
treecec9681ee72a3f984745227636cabf2bd2f983ab /Graphics/GLSLTools
parentFixed HLSL2GLSLConverterTest.CS_RWTex2D_1 test on 32-bit D3D12 (diff)
downloadDiligentCore-996bfb53528aeaaba532413bf1848a0ebc3b03f0.tar.gz
DiligentCore-996bfb53528aeaaba532413bf1848a0ebc3b03f0.zip
Unit tests: capturing debug output; fixed minor issue with viewport in Vk backend.
Diffstat (limited to 'Graphics/GLSLTools')
-rw-r--r--Graphics/GLSLTools/src/SPIRVUtils.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/Graphics/GLSLTools/src/SPIRVUtils.cpp b/Graphics/GLSLTools/src/SPIRVUtils.cpp
index 56e9b2b5..42eb2c87 100644
--- a/Graphics/GLSLTools/src/SPIRVUtils.cpp
+++ b/Graphics/GLSLTools/src/SPIRVUtils.cpp
@@ -489,7 +489,10 @@ std::vector<unsigned int> HLSLtoSPIRV(const ShaderCreateInfo& Attribs, IDataBlob
Shader.setStringsWithLengthsAndNames(ShaderStrings, ShaderStringLenghts, Names, 1);
IncluderImpl Includer(Attribs.pShaderSourceStreamFactory);
- auto SPIRV = CompileShaderInternal(Shader, messages, &Includer, SourceCode, SourceCodeLen, ppCompilerOutput);
+
+ auto SPIRV = CompileShaderInternal(Shader, messages, &Includer, SourceCode, SourceCodeLen, ppCompilerOutput);
+ if (SPIRV.empty())
+ return SPIRV;
// SPIR-V bytecode generated from HLSL must be legalized to
// turn it into a valid vulkan SPIR-V shader