Skip to content

Commit

Permalink
Adjust language so it is agnostic of what JS does
Browse files Browse the repository at this point in the history
  • Loading branch information
kainino0x committed Nov 26, 2024
1 parent 7b3c6f6 commit 39698c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
9 changes: 4 additions & 5 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -3846,13 +3846,12 @@ typedef struct WGPUTextureDescriptor {

/**
* If `attributes` is empty *and* `stepMode` is @ref WGPUVertexStepMode_Undefined,
* indicates a "hole" in the parent @ref WGPUVertexState `buffers` array:
* the pipeline does not use a vertex buffer in this `slot`.
* (`arrayStride` is not validated.)
* indicates a "hole" in the parent @ref WGPUVertexState `buffers` array
* (`null` in the JS API, behaving accordingly).
*
* If `attributes` is empty but `stepMode` is *not* @ref WGPUVertexStepMode_Undefined,
* the pipeline still requires a vertex buffer to be bound in this `slot`,
* and `arrayStride` is still validated.
* indicates a vertex buffer with no attributes (`{ attributes: [] }` in the JS API,
* behaving accordingly).
*
* If `stepMode` is @ref WGPUVertexStepMode_Undefined but `attributes` is *not*
* empty, `stepMode` defaults to @ref WGPUVertexStepMode_Vertex.
Expand Down
9 changes: 4 additions & 5 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3098,13 +3098,12 @@ structs:
- name: vertex_buffer_layout
doc: |
If `attributes` is empty *and* `stepMode` is @ref WGPUVertexStepMode_Undefined,
indicates a "hole" in the parent @ref WGPUVertexState `buffers` array:
the pipeline does not use a vertex buffer in this `slot`.
(`arrayStride` is not validated.)
indicates a "hole" in the parent @ref WGPUVertexState `buffers` array
(`null` in the JS API, behaving accordingly).
If `attributes` is empty but `stepMode` is *not* @ref WGPUVertexStepMode_Undefined,
the pipeline still requires a vertex buffer to be bound in this `slot`,
and `arrayStride` is still validated.
indicates a vertex buffer with no attributes (`{ attributes: [] }` in the JS API,
behaving accordingly).
If `stepMode` is @ref WGPUVertexStepMode_Undefined but `attributes` is *not*
empty, `stepMode` defaults to @ref WGPUVertexStepMode_Vertex.
Expand Down

0 comments on commit 39698c7

Please sign in to comment.