Skip to content

Clarify memory locations accessed when writing a vector component - #2152

Merged
dneto0 merged 1 commit into
gpuweb:mainfrom
alan-baker:vector-component-write
Oct 6, 2021
Merged

dneto0 merged 1 commit into
gpuweb:mainfrom
alan-baker:vector-component-write

Conversation

@alan-baker

Copy link
Copy Markdown
Contributor

Fixes #2112

  • Write accesses to a vector component may access all memory locations
    associated with the vector

Fixes gpuweb#2112

* Write accesses to a vector component may access all memory locations
  associated with the vector
@alan-baker alan-baker added the wgsl WebGPU Shading Language Issues label Sep 30, 2021
Comment thread wgsl/index.bs

#### Component reference from vector reference #### {#component-reference-from-vector-reference}

A [=write access=] to component of a vector **may** access all of the [=memory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure this is the ideal spec section to specify this, but it felt better than specifying it in the memory access mode, memory locations or memory layout sections.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is as good a place as any, until #2055 lands.
When that lands, its normative spot would be around the statement:

A memory operation accesses exactly the set of [=memory location|locations=]
associated with the particular [=memory view=] used in the operation.

Because the two statements are in conflict, and the exception overrules the general case.

@github-actions

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (bc7b68a):
WebGPU | IDL
WGSL
Explainer

Comment thread wgsl/index.bs

#### Component reference from vector reference #### {#component-reference-from-vector-reference}

A [=write access=] to component of a vector **may** access all of the [=memory

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is as good a place as any, until #2055 lands.
When that lands, its normative spot would be around the statement:

A memory operation accesses exactly the set of [=memory location|locations=]
associated with the particular [=memory view=] used in the operation.

Because the two statements are in conflict, and the exception overrules the general case.

@dneto0
dneto0 merged commit 80d3f09 into gpuweb:main Oct 6, 2021
github-actions Bot added a commit that referenced this pull request Oct 6, 2021
)

SHA: 80d3f09
Reason: push, by @dneto0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Oct 6, 2021
)

SHA: 80d3f09
Reason: push, by @dneto0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Oct 6, 2021
)

SHA: 80d3f09
Reason: push, by @dneto0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@kdashg

kdashg commented Oct 6, 2021

Copy link
Copy Markdown
Contributor
WGSL meeting minutes 2021-10-05
  • JG: This seems like a harsh reality that we have to accept
  • MM: If you don’t like it, don’t use vectors
  • Accept PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wgsl WebGPU Shading Language Issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Writing to different components of a vector from different invocations

5 participants