diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2023-03-10 12:24:51 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-10 12:24:51 -0500 |
| commit | e39893e8eb1a9411fca4e5f885456a27a770d3a2 (patch) | |
| tree | bcd2f6aa99b5e6425c17d31f5e4a89b98c854f34 /source/compiler-core/slang-glslang-compiler.cpp | |
| parent | e06cfb37eb099e45302dd015b0396bf26c913778 (diff) | |
Add struct version to DownstreamCompiler::CompileOptions interface (#2692)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Add versioning to CompileOptions for DownstreamCompiler so we can add new options without breaking binary interface.
* Use builtin offset of directly.
Diffstat (limited to 'source/compiler-core/slang-glslang-compiler.cpp')
| -rw-r--r-- | source/compiler-core/slang-glslang-compiler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/compiler-core/slang-glslang-compiler.cpp b/source/compiler-core/slang-glslang-compiler.cpp index 0673540dc..17abc469b 100644 --- a/source/compiler-core/slang-glslang-compiler.cpp +++ b/source/compiler-core/slang-glslang-compiler.cpp @@ -138,10 +138,16 @@ static SlangResult _parseDiagnosticLine(SliceAllocator& allocator, const Unowned return SLANG_OK; } +SlangResult GlslangDownstreamCompiler::compile(const CompileOptions& inOptions, IArtifact** outArtifact) +{ + if (!isVersionCompatible(inOptions)) + { + // Not possible to compile with this version of the interface. + return SLANG_E_NOT_IMPLEMENTED; + } + CompileOptions options = getCompatibleVersion(&inOptions); -SlangResult GlslangDownstreamCompiler::compile(const CompileOptions& options, IArtifact** outArtifact) -{ // This compiler can only handle a single artifact if (options.sourceArtifacts.count != 1) { |
