From 1e5ec5ca8c73e91c63b787e69c7286728f510b5e Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 4 Dec 2019 13:49:26 -0500 Subject: Setting downstream compiler (#1144) * WIP setting downstream compiler. * Setting default downstream compiler for a source type. --- slang.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'slang.h') diff --git a/slang.h b/slang.h index 233b418c3..c4ee39f6d 100644 --- a/slang.h +++ b/slang.h @@ -615,6 +615,7 @@ extern "C" SLANG_SOURCE_LANGUAGE_GLSL, SLANG_SOURCE_LANGUAGE_C, SLANG_SOURCE_LANGUAGE_CPP, + SLANG_SOURCE_LANGUAGE_COUNT_OF, }; typedef unsigned int SlangProfileID; @@ -2836,6 +2837,25 @@ namespace slang @return The build tag string */ virtual SLANG_NO_THROW const char* SLANG_MCALL getBuildTagString() = 0; + + /* For a given source language set the default compiler. + If a default cannot be chosen (for example the target cannot be achieved by the default), + the default will not be used. + + @param sourceLanguage the source language + @param defaultCompiler the default compiler for that language + @return + */ + virtual SLANG_NO_THROW SlangResult SLANG_MCALL setDefaultDownstreamCompiler( + SlangSourceLanguage sourceLanguage, + SlangPassThrough defaultCompiler) = 0; + + /* For a source type get the default compiler + + @param sourceLanguage the source language + @return The downstream compiler for that source language */ + virtual SlangPassThrough SLANG_MCALL getDefaultDownstreamCompiler( + SlangSourceLanguage sourceLanguage) = 0; }; #define SLANG_UUID_IGlobalSession { 0xc140b5fd, 0xc78, 0x452e, { 0xba, 0x7c, 0x1a, 0x1e, 0x70, 0xc7, 0xf7, 0x1c } }; -- cgit v1.2.3