Repository navigation
Allow aliased resource variables - #3581
Merged
Merged
Conversation
Contributes to gpuweb#1842 * Clarify a memory view depends on the memory model reference * Allow aliased resources, but make it a dynamic error if the aliased resources are mutable * Clarify that resource variables form a memory model reference based on the group and binding pair * Clarify resource variable may have overlapping memory locations
alan-baker
requested review from
dneto0,
kainino0x,
kdashg and
mehmetoguzderin
November 7, 2022 20:24
Contributor
|
Previews, as seen when this build job started (0ab5063): |
dneto0
requested changes
Nov 7, 2022
| Bindings [=shader-creation error|must not=] alias within a [=shader=]: | ||
| two different variables in the resource interface of a given | ||
| shader [=shader-creation error|must not=] have the same group and binding values, when considered as a pair of values. | ||
| It is a [=dynamic error=] if two mutable resource variables have the same pair |
Contributor
There was a problem hiding this comment.
This is not the kind of aliasing that is wanted.
They want the same memory locations to be accessilble from resources with distinct (group,binding).
Not that they want to allow two variables with the same (group,binding).
Maybe it's best to avoid using the word "aliasing" here at all, and simplify:
Two different resource variables in a [=shader=] [=...|must not=] have the same group and binding values, when considered as a pair.
| the unique [=attribute/group=] and [=attribute/binding=] pair. | ||
| All other variables (i.e. variables in the [=address spaces/function=], | ||
| [=address spaces/private=], and [=address spaces/workgroup=] address spaces) | ||
| for a unique [=memory model reference=] for the lifetime of the variable. |
Contributor
There was a problem hiding this comment.
"form"
So "Each other variable .... forms a ..."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributes to #1842