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

Perform type legalization on StructuredBuffer element. #4767

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

csyonghe
Copy link
Collaborator

Closes #4455.

The issue here is that we need to make sure to legalize T referenced in a StructuredBuffer<T>, so that we can generate valid code if some field in T becomes an empty type.

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Jul 31, 2024
Copy link
Collaborator

@jkwak-work jkwak-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

}
};

//TEST_INPUT: set inBuffer = new StructuredBuffer<TestInterface>[new TestImplementation{}];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. I didn't know we can do things like this.

@csyonghe csyonghe merged commit 69dd7f4 into shader-slang:master Aug 1, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash with TypeConformance
2 participants