message: Vulkan backend: added SPIRV legalization when compiling from HLSL
diff: #include "DataBlobImpl.h"
  #include "RefCntAutoPtr.h"
  +#include "spirv-tools/optimizer.hpp"
  +
  static const char g_HLSLDefinitions[] =
  {
  #include "../../GraphicsEngineD3DBase/include/HLSLDefinitions_inc.fxh"
  @@ -461,7 +463,22 @@ std::vector<unsigned int> HLSLtoSPIRV(const ShaderCreateInfo& Attribs, IDataBlob
  Shader.setStringsWithLengthsAndNames(ShaderStrings, ShaderStringLenghts, Names, 1);
  IncluderImpl Includer(Attribs.pShaderSourceStreamFactory);
  - return CompileShaderInternal(Shader, messages, &Includer, SourceCode, SourceCodeLen, ppCompilerOutput);
  + auto SPIRV = CompileShaderInternal(Shader, messages, &Includer, SourceCode, SourceCodeLen, ppCompilerOutput);
  +
  + // SPIR-V bytecode generated from HLSL must be legalized to
  + // turn it into a valid vulkan SPIR-V shader
  + spvtools::Optimizer SpirvOptimizer(SPV_ENV_VULKAN_1_0);
  + SpirvOptimizer.RegisterLegalizationPasses();
  + std::vector<uint32_t> LegalizedSPIRV;
  + if (SpirvOptimizer.Run(SPIRV.data(), SPIRV.size(), &LegalizedSPIRV))
  + {
  + return std::move(LegalizedSPIRV);
  + }
  + else
  + {
  + LOG_ERROR("Failed to legalize SPIR-V shader generated by HLSL front-end. This may result in undefined behavior.");
  + return std::move(SPIRV);
  + }
  }
  std::vector<unsigned int> GLSLtoSPIRV(const SHADER_TYPE ShaderType, const char* ShaderSource, int SourceCodeLen, IDataBlob** ppCompilerOutput)
  