I am trying to convert OpenGL shader (from the SPIRV tutorials) to MLIR through SPIRV. The flow is as follows:
.frag to .spv to .mlir
To achieve this I used:
gslangValidator binary to convert .frag to .spv
mlir-translate to deserialize .spv to .mlir.
I kept getting errors about unhandled decorations in the deserializer. I edited the mlir spirv deserializer to handle (do nothing) Location and Perspective decorations but then I faced a Core Dump error related to processing other instructions.
I tried a different example (.frag file) but I got an OpCode 25 not handled error.
I don’t have strong experience in LLVM/MLIR/SPIRV but I followed the documentation and tutorials I could find about SPIRV Dialect, nonetheless, I am still stuck trying to get a hello world example to work.
Can someone point me to an end-to-end example of converting .frag to .spv and then to MLIR? Or whether this is something doable in the first place. I appreciate any material that can help.