From 17c6c6044965629a3ae7e8ef004cc0b2ca657c55 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 4 Feb 2020 15:19:48 -0500 Subject: CUDA/C++ backend improvements (#1198) * WIP with vector float test. * vector-float test working. * Fixed remaing tests broken with init changes. * Improve 64bit-type-support.md * Disable tests broken on CI system for Dx. * WIP: Make type available for comparison. * Moved type conversion into TypeTextUtil. * Add text/type conversions from DownstreamCompiler to TypeTextUtil. * Allow compaison taking into account type. * Removed quantize in vector-float.slang test. --- source/slang/slang-options.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-options.cpp') diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp index f9f8db0e2..456c43fa6 100644 --- a/source/slang/slang-options.cpp +++ b/source/slang/slang-options.cpp @@ -15,6 +15,8 @@ #include "slang-state-serialize.h" #include "slang-ir-serialize.h" +#include "../core/slang-type-text-util.h" + #include namespace Slang { @@ -708,7 +710,7 @@ struct OptionsParser SLANG_RETURN_ON_FAIL(tryReadCommandLineArgument(sink, arg, &argCursor, argEnd, name)); SlangPassThrough passThrough = SLANG_PASS_THROUGH_NONE; - if (SLANG_FAILED(DownstreamCompiler::getPassThroughFromName(name.getUnownedSlice(), passThrough))) + if (SLANG_FAILED(TypeTextUtil::asPassThrough(name.getUnownedSlice(), passThrough))) { sink->diagnose(SourceLoc(), Diagnostics::unknownPassThroughTarget, name); return SLANG_FAIL; @@ -943,7 +945,7 @@ struct OptionsParser String compilerText; SLANG_RETURN_ON_FAIL(tryReadCommandLineArgument(sink, arg, &argCursor, argEnd, compilerText)); - SlangSourceLanguage sourceLanguage = DownstreamCompiler::getSourceLanguageFromName(sourceLanguageText.getUnownedSlice()); + SlangSourceLanguage sourceLanguage = TypeTextUtil::asSourceLanguage(sourceLanguageText.getUnownedSlice()); if (sourceLanguage == SLANG_SOURCE_LANGUAGE_UNKNOWN) { sink->diagnose(SourceLoc(), Diagnostics::unknownSourceLanguage, sourceLanguageText); @@ -951,7 +953,7 @@ struct OptionsParser } SlangPassThrough compiler; - if (SLANG_FAILED(DownstreamCompiler::getPassThroughFromName(compilerText.getUnownedSlice(), compiler))) + if (SLANG_FAILED(TypeTextUtil::asPassThrough(compilerText.getUnownedSlice(), compiler))) { sink->diagnose(SourceLoc(), Diagnostics::unknownPassThroughTarget, compilerText); return SLANG_FAIL; @@ -985,7 +987,7 @@ struct OptionsParser String slice = argStr.subString(1, index - 1); SlangPassThrough passThrough = SLANG_PASS_THROUGH_NONE; - if (SLANG_SUCCEEDED(DownstreamCompiler::getPassThroughFromName(slice.getUnownedSlice(), passThrough))) + if (SLANG_SUCCEEDED(TypeTextUtil::asPassThrough(slice.getUnownedSlice(), passThrough))) { session->setDownstreamCompilerPath(passThrough, name.getBuffer()); continue; -- cgit v1.2.3