From 996bfb53528aeaaba532413bf1848a0ebc3b03f0 Mon Sep 17 00:00:00 2001 From: assiduous Date: Fri, 13 Dec 2019 10:03:15 -0800 Subject: Unit tests: capturing debug output; fixed minor issue with viewport in Vk backend. --- Graphics/GLSLTools/src/SPIRVUtils.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Graphics/GLSLTools') 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 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 -- cgit v1.2.3