How to replace modules that have been loaded into a Slang session before with updated code? #10054
-
|
Hi, I'm having trouble finding out how – or if at all – it's possible to replace a module once it has been compiled to IR inside a session. My use case is essentially something like hot reload of shaders: users should be able to change files on disk, and only a file that changed should have to undergo the from-scratch translation to IR. Or certain shader code should be online-editable within the application and get recompiled. I'm aware of course that my program is then responsible for re-composing and re-linking if that module was used somewhere. Currently, if I just load the module again via Of course I could just use a new |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
There is currently no way to unload a module afaik. The only way to get the newest version of a shader/module is to recreate the session. Imo there should be a way to invalidate and reload a module, since it saves a lot of time in hot reloading single shaders. |
Beta Was this translation helpful? Give feedback.
There is currently no way to unload a module afaik. The only way to get the newest version of a shader/module is to recreate the session.
At least that was the answer when it came up before.
Imo there should be a way to invalidate and reload a module, since it saves a lot of time in hot reloading single shaders.