You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there.
I've been looking for a way to get nim code into shaders for a while.
I know of treeform/shady, but its made for glsl-opengl only. And I use mostly wgpu (and learning vk a bit).
Both wgpu and vulkan support spirv, and I was wondering if the code generated by this lib would be usable for conversion from llvm to spirv.
There is a converter on Khronos's github, but I know that shader lang has special requirements (don't know what thought, my knowledge of compiler internals is very low).
Do you think this conversion would be possible, using nlvm?
Could the IR generated by this compiler be used for that task?
The text was updated successfully, but these errors were encountered:
From what I can tell, https://github.com/KhronosGroup/SPIRV-LLVM-Translator translate llvm byte code - you can use nlvm c -c to generate raw llvm IR from Nim code which in principle should be translatable using the above tool.
I would recommend using --gc:none and -d:useMalloc to avoid including the Nim garbage collector - alternatively, --os:standalone.
Hi there.
I've been looking for a way to get nim code into shaders for a while.
I know of
treeform/shady
, but its made for glsl-opengl only. And I use mostly wgpu (and learning vk a bit).Both wgpu and vulkan support spirv, and I was wondering if the code generated by this lib would be usable for conversion from llvm to spirv.
There is a converter on Khronos's github, but I know that shader lang has special requirements (don't know what thought, my knowledge of compiler internals is very low).
Do you think this conversion would be possible, using nlvm?
Could the IR generated by this compiler be used for that task?
The text was updated successfully, but these errors were encountered: