From 86e11e0e111fab60b9517056ac049bfac6e3bd25 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 16 Jan 2019 13:31:42 -0500 Subject: Feature/external compiler reporting (#776) * Added support for converting SlangResult to string in PlatformUtil. * * Added reportExternalCompilerError * Made external compilers use this * Made DiagnosticSink accept UnownedStringSlice * Made emitXXX compiler functions return SlangError * Use smart pointers to handle life of Com interfaces * * Make SlangResult compatible with HRESULT for some common cases. * Make PlatformUtil::appendResult return SlangResult * Compile check SLANG_RESULT. * Add tests for checking diagnostics from external compilers. * * Make external compiler tests only run on windows for now. * Added 'windows' and 'unix' categories * Added categories based on what backends are available. Will make more tests run on linux and handle case where dxcompiler is not available on appveyor. * * Added spSessionCheckPassThroughSupport * Use to determine whats available for categories for tests * Add support for outputting source filename/s when using pass through. --- source/slang/slang.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 22f6feac3..d516d0cb2 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -1209,6 +1209,14 @@ SLANG_API SlangResult spSessionCheckCompileTargetSupport( return Slang::checkCompileTargetSupport(s, Slang::CodeGenTarget(target)); } +SLANG_API SlangResult spSessionCheckPassThroughSupport( + SlangSession* session, + SlangPassThrough passThrough) +{ + auto s = SESSION(session); + return Slang::checkExternalCompilerSupport(s, Slang::PassThroughMode(passThrough)); +} + SLANG_API SlangCompileRequest* spCreateCompileRequest( SlangSession* session) { -- cgit v1.2.3