I compile two different implementations (PointLight and SpotLight) of this interface to two slang-modules, which then get added when compiling the main shader above. If I only use one implementation it compiles but when using two, it results in a crash.
Directly compiling to spirv gives me "Unhandled global inst in spirv-emit: witness_table %1 : %2(%PointLight);"
Compiling to glsl gives me an internal error 99999
So the problem comes from the last line where the compiler has an kIROp_swizzle with kIROp_WitnessTable as operand0, which then in the func defaultEmitInstExpr can not be handled and results in the error.
https://github.com/fknfilewalker/dyslang contains the code
tests/load_plugins_one works but tests/load_plugins_two crashes (only tried it on windows)
DYSLANG_SLANG_FROM_SUBMODULE TRUE uses the latest github code.
So I have this simple interface and the following simple shader:
I compile two different implementations (PointLight and SpotLight) of this interface to two slang-modules, which then get added when compiling the main shader above. If I only use one implementation it compiles but when using two, it results in a crash.
Directly compiling to spirv gives me "Unhandled global inst in spirv-emit: witness_table %1 : %2(%PointLight);" Compiling to glsl gives me an internal error 99999
So the problem comes from the last line where the compiler has an
kIROp_swizzle
withkIROp_WitnessTable
as operand0, which then in the funcdefaultEmitInstExpr
can not be handled and results in the error.https://github.com/fknfilewalker/dyslang contains the code
tests/load_plugins_one
works buttests/load_plugins_two
crashes (only tried it on windows)DYSLANG_SLANG_FROM_SUBMODULE TRUE
uses the latest github code.