diff options
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp index 914aea7fd..c3e1b2d08 100644 --- a/source/slang/emit.cpp +++ b/source/slang/emit.cpp @@ -6640,36 +6640,6 @@ String emitEntryPoint( // un-specialized IR. dumpIRIfEnabled(compileRequest, irModule); - - - // For GLSL only, we will need to perform "legalization" of - // the entry point and any entry-point parameters. - // - // TODO: We should consider moving this legalization work - // as late as possible, so that it doesn't affect how other - // optimization passes need to work. - // - switch (target) - { - case CodeGenTarget::GLSL: - { - legalizeEntryPointForGLSL( - session, - irModule, - irEntryPoint, - &compileRequest->mSink, - &sharedContext.extensionUsageTracker); - } - break; - - default: - break; - } -#if 0 - dumpIRIfEnabled(compileRequest, irModule, "GLSL LEGALIZED"); -#endif - validateIRModuleIfEnabled(compileRequest, irModule); - // Desguar any union types, since these will be illegal on // various targets. // @@ -6765,6 +6735,34 @@ String emitEntryPoint( #endif validateIRModuleIfEnabled(compileRequest, irModule); + // For GLSL only, we will need to perform "legalization" of + // the entry point and any entry-point parameters. + // + // TODO: We should consider moving this legalization work + // as late as possible, so that it doesn't affect how other + // optimization passes need to work. + // + switch (target) + { + case CodeGenTarget::GLSL: + { + legalizeEntryPointForGLSL( + session, + irModule, + irEntryPoint, + &compileRequest->mSink, + &sharedContext.extensionUsageTracker); + } + break; + + default: + break; + } +#if 0 + dumpIRIfEnabled(compileRequest, irModule, "GLSL LEGALIZED"); +#endif + validateIRModuleIfEnabled(compileRequest, irModule); + // The resource-based specialization pass above // may create specialized versions of functions, but // it does not try to completely eliminate the original |
