Closed chaoticbob closed 3 weeks ago
The compile request API is deprecated. I realize that the IComponentType interface is missing a method. We need to add getWholeProgramCode
so you can do this:
auto module = compileSession->loadModule(...);
auto linkedModule = module->link();
auto spvLibCode = linkedModule->getWholeProgramCode(..);
Was wondering if I could get a quick sanity on Slang API correctness when compiling a single source file containing multiple shaders to SPIR-V library using the Slang API.
The specific case for this is compiling several ray tracing shaders that live in the same source file (or string in this case). I looked through the
ray-tracing-pipeline
sample and found that it eventually does a per entry compile to a module for each entry point.What I was trying to accomplish effectively the same thing as using
-profile lib_6_3
on the command line without specifying any entry points. After debug walking through howslangc
handles, I was able to clobber something together to accomplish what I wanted. However, I'm not sure if it's entirely correct.Was wondering if someone familiar with the Slang API could sanity check the code and provide any corrections? The compile to library starts at
if (isTargetLibrary)
.Related question: if I create a compile request using
ISession::createCompileRequest
, do I need to manually destroy the compile request usingspDestroyCompileRequest
?Thanks.