Skip to content
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

[spv-in] patch the SPIR-Vs wacky CFG cases by hand #844

Merged
merged 1 commit into from
May 9, 2021

Conversation

kvark
Copy link
Member

@kvark kvark commented May 7, 2021

This is a HACK: we patch 2 known cases where the domination block emitted expressions that were later used by the parent:

  • "if () { something } else { break; }"
  • "switch () { default: something }"

Fixes #586
Closes #409

@kvark
Copy link
Member Author

kvark commented May 9, 2021

This is clearly not a generic solution to the CFG scoping issue. But it's a working patch, and it's surprisingly tiny. So let's go with it and be ready to scrap it later if we find a proper solution.

@kvark kvark merged commit 851f504 into gfx-rs:master May 9, 2021
@kvark kvark deleted the spv-hack branch May 9, 2021 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch default block dominating the merge block in SPIR-V [meta] Process Dota2's SPIRV to MSL
1 participant