From 6684d32db1f5693bcfb4971558cb30e855cd3bad Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 5 Mar 2020 10:59:54 -0500 Subject: Feature/glslang spirv version (#1256) * WIP add support for __spirv_version . * Added IRRequireSPIRVVersionDecoration * SPIR-V version passed to glslang. Enable VK wave tests. Split ExtensionTracker out, so can be cast and used externally to emit. Added SourceResult. * Fix warning on Clang. * Missing hlsl.meta.h * Refactor communication/parsing of __spirv_version with glslang. * Fix some debug typos. Be more precise in handling of substring handling. * Make glslang forwards and backwards binary compatible. * Small comment improvements. * Added slang-spirv-target-info.h/cpp * Fix for major/minor on gcc. * Another fix for gcc/clang. * VS projects include slang-spirv-target-info.h/cpp * Removed SPIRVTargetInfo Added SemanticVersion. Don't bother with passing a target to glslang. Should be separate from 'version'. * Renamed slang-emit-glsl-extension-tracker.cpp/.h -> slang-glsl-extension-tracker.cpp/.h Fixed some VS project issues. * Fix a comment. * Added slang-semantic-version.cpp/.h * Added slang-glsl-extension-tracker.cpp/.h * Added split that can check for input has all been parsed. * Fix problem on x86 win build. --- source/slang/slang-check.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/slang/slang-check.cpp') diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp index dd28a9d71..275818614 100644 --- a/source/slang/slang-check.cpp +++ b/source/slang/slang-check.cpp @@ -71,7 +71,8 @@ namespace Slang switch (funcType) { - case FuncType::Glslang_Compile: return { "glslang_compile", PassThroughMode::Glslang} ; + case FuncType::Glslang_Compile_1_0: return { "glslang_compile", PassThroughMode::Glslang} ; + case FuncType::Glslang_Compile_1_1: return { "glslang_compile_1_1", PassThroughMode::Glslang} ; case FuncType::Fxc_D3DCompile: return { "D3DCompile", PassThroughMode::Fxc}; case FuncType::Fxc_D3DDisassemble: return { "D3DDisassemble", PassThroughMode::Fxc }; case FuncType::Dxc_DxcCreateInstance: return { "DxcCreateInstance", PassThroughMode::Dxc }; @@ -182,8 +183,11 @@ namespace Slang SlangFuncPtr func = sharedLibrary->findFuncByName(info.name); if (!func) { - UnownedStringSlice compilerName = TypeTextUtil::getPassThroughName(SlangPassThrough(info.compilerType)); - sink->diagnose(SourceLoc(), Diagnostics::failedToFindFunctionForCompiler, info.name, compilerName); + if (sink) + { + UnownedStringSlice compilerName = TypeTextUtil::getPassThroughName(SlangPassThrough(info.compilerType)); + sink->diagnose(SourceLoc(), Diagnostics::failedToFindFunctionForCompiler, info.name, compilerName); + } return nullptr; } -- cgit v1.2.3