diff options
| author | Tim Foley <tfoleyNV@users.noreply.github.com> | 2018-02-03 07:30:54 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-03 07:30:54 -0800 |
| commit | 662f43fff6721c6cd013a8f1b2639c2e29fe6be3 (patch) | |
| tree | 9e57c4a9f1a922418fbae2390ee1998984a6ea26 /source/slang/slang.cpp | |
| parent | 58475a8aa42284722a3763aa3bde49f2fa40366e (diff) | |
Remove non-IR codegen paths (#398)
The basic change is simple: remove support for all code generation paths other than the IR.
There is a lot of vestigial code left, but the main logic in `ast-legalize.*` is gone.
Doing this breaks a *lot* of tests, for various reasons:
- We can no longer guarantee exactly matching DXBC or SPIR-V output after things pass through out IR
- Many builtins don't have matching versions defined for GLSL output via IR (even when they had versions defined via the earlier approach that worked with the AST)
- A lot of code creates intermediate values of opaque types in the IR, which turn into opaque-type temporaries that aren't allowed (this breaks many GLSL tests, but also some HLSL)
I implemented some small fixes for issues that I could get working in the time I had, but most of the above are larger than made sense to fix in this commit.
For now I'm disabling the tests that cause problems, but we will need to make a concerted effort to get things working on this new substrate if we are going to make good on our goals.
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 90a9a3aef..c25a4f2ce 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -254,12 +254,6 @@ void CompileRequest::generateIR() // for all of the declarations in the translation // units that were loaded. - // At the moment, use of the IR is not enabled by - // default, so we will skip this step unless - // the flag was set to op in. - if (!(compileFlags & SLANG_COMPILE_FLAG_USE_IR)) - return; - // Each translation unit is its own little world // for code generation (we are not trying to // replicate the GLSL linkage model), and so @@ -529,7 +523,7 @@ RefPtr<ModuleDecl> CompileRequest::loadModule( // semantic checking to be enabled. // // TODO: decide which options, if any, should be inherited. - translationUnit->compileFlags = this->compileFlags & (SLANG_COMPILE_FLAG_USE_IR); + translationUnit->compileFlags = 0; RefPtr<SourceFile> sourceFile = getSourceManager()->allocateSourceFile(path, source); |
