diff options
Diffstat (limited to 'source/slang/slang-emit.cpp')
| -rw-r--r-- | source/slang/slang-emit.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/slang/slang-emit.cpp b/source/slang/slang-emit.cpp index 6a0f46e0a..a18eed928 100644 --- a/source/slang/slang-emit.cpp +++ b/source/slang/slang-emit.cpp @@ -475,7 +475,6 @@ Result linkAndOptimizeIR( // We don't need the legalize pass for C/C++ based types if(options.shouldLegalizeExistentialAndResourceTypes ) -// if (!(sourceLanguage == SourceLanguage::CPP || sourceStyle == SourceLanguage::C)) { // The Slang language allows interfaces to be used like // ordinary types (including placing them in constant @@ -534,6 +533,20 @@ Result linkAndOptimizeIR( #endif validateIRModuleIfEnabled(codeGenContext, irModule); } + else + { +#if 0 + // On CPU/CUDA targets, we simply elminate any empty types. + // TODO: disable for now, since the CPU compute shader + // trampoline is still hard coded to assume there are + // entrypoint and global parameters. renable when + // we fix that logic. + legalizeEmptyTypes( + irModule, + sink); + eliminateDeadCode(irModule); +#endif + } // Once specialization and type legalization have been performed, // we should perform some of our basic optimization steps again, |
