diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-12-01 17:29:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-01 17:29:01 -0500 |
| commit | 200e236d64a02d9e85cb4a459477e073b81f5182 (patch) | |
| tree | 7c1c7b75eb8d95238afe154ff826ec065767104b /source/slang/slang-compiler.cpp | |
| parent | 339422dc91e10d15cf861ba3006025e3cec250c5 (diff) | |
Make SlangCompileRequest COM type (#1620)
* #include an absolute path didn't work - because paths were taken to always be relative.
* WIP for COM CompileRequest.
* Add more methods to IGlobalSession.
* Fix createCompileRequest.
Made slangc tool use COM style methods.
* m_ prefix variables in EndToEndCompileRequest
Diffstat (limited to 'source/slang/slang-compiler.cpp')
| -rwxr-xr-x | source/slang/slang-compiler.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp index 306119b5f..0d92fbacc 100755 --- a/source/slang/slang-compiler.cpp +++ b/source/slang/slang-compiler.cpp @@ -516,14 +516,6 @@ namespace Slang return PassThroughMode::None; } - SlangResult checkCompileTargetSupport(Session* session, CodeGenTarget target) - { - const PassThroughMode mode = getDownstreamCompilerRequiredForTarget(target); - return (mode != PassThroughMode::None) ? - checkExternalCompilerSupport(session, mode) : - SLANG_OK; - } - bool isPassThroughEnabled( EndToEndCompileRequest* endToEndReq) { // If there isn't an end-to-end compile going on, @@ -534,7 +526,7 @@ namespace Slang // And if pass-through isn't set, we don't need // access to the translation unit. // - if(endToEndReq->passThrough == PassThroughMode::None) return false; + if(endToEndReq->m_passThrough == PassThroughMode::None) return false; return true; } /// If there is a pass-through compile going on, find the translation unit for the given entry point. @@ -544,7 +536,7 @@ namespace Slang Int entryPointIndex) { SLANG_ASSERT(endToEndReq); - SLANG_ASSERT(endToEndReq->passThrough != PassThroughMode::None); + SLANG_ASSERT(endToEndReq->m_passThrough != PassThroughMode::None); auto frontEndReq = endToEndReq->getFrontEndReq(); auto entryPointReq = frontEndReq->getEntryPointReq(entryPointIndex); auto translationUnit = entryPointReq->getTranslationUnit(); @@ -1241,7 +1233,7 @@ SlangResult dissassembleDXILUsingDXC( CodeGenTarget sourceTarget = CodeGenTarget::None; SourceLanguage sourceLanguage = SourceLanguage::Unknown; - PassThroughMode downstreamCompiler = endToEndReq ? endToEndReq->passThrough : PassThroughMode::None; + PassThroughMode downstreamCompiler = endToEndReq ? endToEndReq->m_passThrough : PassThroughMode::None; // If we are not in pass through, lookup the default compiler for the emitted source type if (downstreamCompiler == PassThroughMode::None) @@ -2147,7 +2139,7 @@ SlangResult dissassembleDXILUsingDXC( // get paths specified via command-line options. // RefPtr<EndToEndCompileRequest::TargetInfo> targetInfo; - if (compileRequest->targetInfos.TryGetValue(targetReq, targetInfo)) + if (compileRequest->m_targetInfos.TryGetValue(targetReq, targetInfo)) { String outputPath = targetInfo->wholeTargetOutputPath; if (outputPath != "") @@ -2183,7 +2175,7 @@ SlangResult dissassembleDXILUsingDXC( // RefPtr<EndToEndCompileRequest::TargetInfo> targetInfo; auto entryPoint = currentProgram->getEntryPoint(entryPointIndex); - if(compileRequest->targetInfos.TryGetValue(targetReq, targetInfo)) + if(compileRequest->m_targetInfos.TryGetValue(targetReq, targetInfo)) { String outputPath; if(targetInfo->entryPointOutputPaths.TryGetValue(entryPointIndex, outputPath)) @@ -2481,7 +2473,7 @@ SlangResult dissassembleDXILUsingDXC( // If we are in command-line mode, we might be expected to actually // write output to one or more files here. - if (compileRequest->isCommandLineCompile) + if (compileRequest->m_isCommandLineCompile) { auto linkage = compileRequest->getLinkage(); auto program = compileRequest->getSpecializedGlobalAndEntryPointsComponentType(); |
