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

glsl-in: Allow multiple array specifiers #1780

Merged
merged 1 commit into from
Mar 27, 2022

Conversation

JCapucho
Copy link
Collaborator

Closes #1769

meta.subsume(end_meta);
Ok(Some((ArraySize::Constant(constant), meta)))

Ok(true)
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why we are mutating ty and returning Ok(bool) if we could instead return something like Result<Option<Handle<Type>>>. Do you think this would be a feasible thing to change here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We definitely could but I don't what the benefit would be since we would be mutating the type anyways.

Copy link
Member

Choose a reason for hiding this comment

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

Where would we be mutating the type? This would just return a new type.
Or do you mean that the caller would likely reassign the type anyway? That's OK, I think.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes the caller always reassigns the type

Copy link
Member

Choose a reason for hiding this comment

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

I think that would still be a better internal API.

@JCapucho JCapucho requested a review from kvark March 25, 2022 23:09
@kvark kvark merged commit 54ef2e3 into gfx-rs:master Mar 27, 2022
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.

[glsl-in] 2D array support
2 participants