Skip to content

Conversation

kainino0x
Copy link
Contributor

Also refactor the prose slightly so that this change makes more sense in context.

Fixes #5064

Also refactor the prose slightly so that this change makes more sense in
context.

Fixes 5064
@kainino0x kainino0x added copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.) api WebGPU API labels Feb 19, 2025
@kainino0x kainino0x added this to the Milestone 1 milestone Feb 19, 2025
@kainino0x kainino0x requested a review from toji February 19, 2025 19:59
Copy link
Contributor

Previews, as seen when this build job started (f6c145d):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@kainino0x kainino0x requested a review from jimblandy February 19, 2025 21:17
@kainino0x
Copy link
Contributor Author

Oh, Brandon is out. Jim, could you review?

Copy link

@mwyrzykowski mwyrzykowski left a comment

Choose a reason for hiding this comment

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

Doesn't the definition of vertexElementRelativeOffset still allow for negative vertexElementIndex? E.g., consider

|vertexElementIndex| * |vertexBufferLayout|.{{GPUVertexBufferLayout/arrayStride}} +
                |attributeDesc|.{{GPUVertexAttribute/offset}}.

as long as |attributeDesc|.{{GPUVertexAttribute/offset}} >= -|vertexElementIndex| * |vertexBufferLayout|.{{GPUVertexBufferLayout/arrayStride}} then as written I believe vertexElementIndex < 0 would still be allowed.

Is negative vertexElementIndex supported across all APIs? I could only find reference in the GL specification which says it is not. Specifically I would wonder which values are populated in vertex_index on the shader side.

@Kangz Kangz modified the milestones: Milestone 1, Milestone 2 Oct 2, 2025
@Kangz
Copy link
Contributor

Kangz commented Oct 2, 2025

Is this PR still current?

@kainino0x
Copy link
Contributor Author

We never fixed this so yes. But I'll have to revisit at some point to figure out what we were doing.

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

Labels

api WebGPU API copyediting Pure editorial stuff (copyediting, *.bs file syntax, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WebGPU] Index resolution is potentially underspecified

3 participants