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

Merge PR 2217 #2218

Merged
merged 4 commits into from
Oct 16, 2023
Merged

Merge PR 2217 #2218

merged 4 commits into from
Oct 16, 2023

Conversation

HansKristian-Work
Copy link
Contributor

No description provided.

billhollings and others added 4 commits October 14, 2023 14:46
Metal 3.1 introduced a Metal regression bug which causes an infinite recursion
crash during Metal's analysis of an entry point input structure that itself
contains internal recursion. This patch works around this by replacing the
recursive input declaration with a alternate variable of type void*, and
then casting to the correct type at the top of the entry point function.

- Add CompilerMSL::Options::replace_recursive_inputs to enable
  replacing recursive input.
- Add Compiler::type_contains_recursion() to determine if a struct
  contains internal recursion, and add custom Decorations to mark
  such structs, to short-cut future similar checks.
- Replace recursive input struct declarations with void*,
  and emit a recast to correct type at top of entry function.
- Add unit test.
- Compiler::type_is_top_level_block() remove hardcode reference to spirv_cross
  namespace, as it interferes with configurable namespaces (unrelated).
@HansKristian-Work HansKristian-Work merged commit 2de1265 into main Oct 16, 2023
6 checks passed
@HansKristian-Work HansKristian-Work deleted the pr-2217 branch October 16, 2023 10:19
@billhollings
Copy link
Contributor

billhollings commented Oct 16, 2023

Thanks for the merge.

Sorry about leaving the temp-commented-out lines in test_shaders.sh on my second push. That was a dumb oversight on my part.

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.

2 participants