File tree 4 files changed +16
-1
lines changed
4 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -31,3 +31,9 @@ tests/**/*.cpp
31
31
# Files generated by other shader compilers
32
32
33
33
* .spv
34
+
35
+ # Intermediate source files generated during build process
36
+ /source /slang /slang-ast-generated.h
37
+ /source /slang /slang-ast-generated-macro.h
38
+ /source /slang /hlsl.meta.slang.h
39
+ /source /slang /core.meta.slang.h
Original file line number Diff line number Diff line change @@ -1759,6 +1759,10 @@ namespace Slang
1759
1759
// / Should SPIR-V be generated directly from Slang IR rather than via translation to GLSL?
1760
1760
bool shouldEmitSPIRVDirectly = false ;
1761
1761
1762
+
1763
+ // If true will allow generating dynamic dispatch code for generics.
1764
+ bool allowDynamicCode = false ;
1765
+
1762
1766
String m_dumpIntermediatePrefix;
1763
1767
1764
1768
private:
Original file line number Diff line number Diff line change @@ -270,7 +270,8 @@ Result linkAndOptimizeIR(
270
270
// perform specialization of functions based on parameter
271
271
// values that need to be compile-time constants.
272
272
//
273
- specializeModule (irModule);
273
+ if (!compileRequest->allowDynamicCode )
274
+ specializeModule (irModule);
274
275
275
276
// Debugging code for IR transformations...
276
277
#if 0
Original file line number Diff line number Diff line change @@ -557,6 +557,10 @@ struct OptionsParser
557
557
{
558
558
requestImpl->getFrontEndReq ()->useSerialIRBottleneck = true ;
559
559
}
560
+ else if (argStr == " -allow-dynamic-code" )
561
+ {
562
+ requestImpl->getBackEndReq ()->allowDynamicCode = true ;
563
+ }
560
564
else if (argStr == " -verbose-paths" )
561
565
{
562
566
requestImpl->getSink ()->setFlag (DiagnosticSink::Flag::VerbosePath);
You can’t perform that action at this time.
0 commit comments