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

msl: qualify read-only storage with const #1763

Merged
merged 1 commit into from
Mar 7, 2022
Merged

Conversation

kvark
Copy link
Member

@kvark kvark commented Mar 6, 2022

Fixes #1761

@kvark kvark added the can backport PR that can be back-ported to a release branch label Mar 6, 2022
@kvark kvark requested a review from jimblandy March 6, 2022 17:09
@kvark kvark merged commit 7984537 into gfx-rs:master Mar 7, 2022
@kvark kvark deleted the msl-access branch March 7, 2022 03:28
Copy link
Member

@jimblandy jimblandy 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.

It's helpful to separate out the changes to the tests into a separate commit, so that the effects of the changes to the code are completely apparent. I'm more likely to miss something when (say) the const qualifiers are mixed in with a lot of renames and code movement.

}
}

/// Returns true if the address space may need a "const" qualifier.
Copy link
Member

Choose a reason for hiding this comment

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

I'm in the dark as to why, say, Uniform and PushConstant don't need const. Is it because their MSL address space alone implies that they're not writable, so const is unnecessary, unlike Storage, Private, and WorkGroup, which could be writable?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added a comment here, and made the MSL output actually contain push constants for the test, in #1767

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
can backport PR that can be back-ported to a release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

read-only storage binding in VS results in scary warning in MSL
2 participants