Handle negative index in vertex processing#5076
Handle negative index in vertex processing#5076kainino0x wants to merge 1 commit intogpuweb:mainfrom
Conversation
Also refactor the prose slightly so that this change makes more sense in context. Fixes 5064
|
Previews, as seen when this build job started (f6c145d): |
|
Oh, Brandon is out. Jim, could you review? |
There was a problem hiding this comment.
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.
|
Is this PR still current? |
|
We never fixed this so yes. But I'll have to revisit at some point to figure out what we were doing. |
Also refactor the prose slightly so that this change makes more sense in context.
Fixes #5064