Only print legalization warning if optimizer disabled

This commit is contained in:
GregF
2018-03-29 11:49:14 -06:00
parent 7be36647fc
commit fb03a55e0f
16 changed files with 21 additions and 21 deletions

View File

@@ -54,12 +54,12 @@ namespace spv {
#endif
}
#ifdef ENABLE_OPT
#if ENABLE_OPT
#include "spirv-tools/optimizer.hpp"
#include "message.h"
#endif
#ifdef ENABLE_OPT
#if ENABLE_OPT
using namespace spvtools;
#endif
@@ -6757,7 +6757,7 @@ void GlslangToSpv(const glslang::TIntermediate& intermediate, std::vector<unsign
it.finishSpv();
it.dumpSpv(spirv);
#ifdef ENABLE_OPT
#if ENABLE_OPT
// If from HLSL, run spirv-opt to "legalize" the SPIR-V for Vulkan
// eg. forward and remove memory writes of opaque types.
if ((intermediate.getSource() == EShSourceHlsl ||