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

Fix Metal type layout reflection for nested parameter blocks. #6042

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

csyonghe
Copy link
Collaborator

@csyonghe csyonghe commented Jan 9, 2025

When computing layout for Metal target for the following type using MetalArgumentBuffer layout:

struct Params
{
     ParameterBlock<Data> data;
     Texture2D t;
}

Params::t should receive id=1, but due to a bug around parameter group type layout, if struct field ha ParameterBlock type and if the ParameterBlock consumes any actual non space layout units, they are not accounted for during construction of a struct layout. This PR fixes this issue so we can correct report t at id = 1.

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Jan 9, 2025
@csyonghe csyonghe requested a review from a team as a code owner January 9, 2025 05:19
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.

1 participant