-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unstructured control flow #889
Comments
I don't really understand the question. SPIRV-Cross can only support the requirements of the Shader programming model, i.e. structured control flow. Please elaborate with a concrete SPIR-V example. |
I'm processing some SPIR-V shader from Apple Metal, which is unstructured control flow. It converts unstructured llvm to unstructured SPIR-V. I want to analyze it's control flow, so I'd like to add new member variable "after_block" to |
I see. I does sound more like this is more suited for SPIRV-Tools though. SPIRV-Cross imo, is not the right place to deal with SPIR-V -> SPIR-V transforms. SPIRV-Cross does not support serializing out the structured SPIR-V after performing the transform, so it won't be useful for consuming MSL in Vulkan. Is there a reason why this work must be done in SPIRV-Cross in particular? |
No particular reason. Right, it's more suited for SPIRV-Tools. Would you accept this small change if I push it to git depo? I'd like to make my version of SPIRV parser consistent with depo's. |
I think you'll get the same effect if you loop over |
I see. Thanks! |
Cool. Don't there is anything that should change in SPIRV-Cross right now, so closing. Good luck with the MSL transform! |
@lifpan Interesting workflow. What toolchain are you using to go from MSL to SPIR-V? |
@billhollings I'm not responsible for the translation of MSL->LLVM->SPIR-V. I don't know the detail. |
Will you support unstructured control flow which don't use "OpLoopMerge" and "OpSelectionMerge"?
I'd like to add a member variable for SPIRBlock struct:
uint32_t after_block = 0; // The block literally resides just after current block.
The text was updated successfully, but these errors were encountered: