Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: remove Undefined from VertexStepMode and binding type enums #424

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 26 additions & 46 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,17 +358,13 @@ typedef enum WGPUBufferBindingType {
* `0x00000000`.
* Indicates that this @ref WGPUBufferBindingLayout member of
* its parent @ref WGPUBindGroupLayoutEntry is not used.
* (See also @ref SentinelValues.)
* (See also @ref SentinelValues. Note that unlike in JS, there is *no*
* `Undefined` value that would trivially-default to `Uniform`.)
*/
WGPUBufferBindingType_BindingNotUsed = 0x00000000,
/**
* `0x00000001`.
* Indicates no value is passed for this argument. See @ref SentinelValues.
*/
WGPUBufferBindingType_Undefined = 0x00000001,
WGPUBufferBindingType_Uniform = 0x00000002,
WGPUBufferBindingType_Storage = 0x00000003,
WGPUBufferBindingType_ReadOnlyStorage = 0x00000004,
WGPUBufferBindingType_Uniform = 0x00000001,
WGPUBufferBindingType_Storage = 0x00000002,
WGPUBufferBindingType_ReadOnlyStorage = 0x00000003,
WGPUBufferBindingType_Force32 = 0x7FFFFFFF
} WGPUBufferBindingType WGPU_ENUM_ATTRIBUTE;

Expand Down Expand Up @@ -750,17 +746,13 @@ typedef enum WGPUSamplerBindingType {
* `0x00000000`.
* Indicates that this @ref WGPUSamplerBindingLayout member of
* its parent @ref WGPUBindGroupLayoutEntry is not used.
* (See also @ref SentinelValues.)
* (See also @ref SentinelValues. Note that unlike in JS, there is *no*
* `Undefined` value that would trivially-default to `Filtering`.)
*/
WGPUSamplerBindingType_BindingNotUsed = 0x00000000,
/**
* `0x00000001`.
* Indicates no value is passed for this argument. See @ref SentinelValues.
*/
WGPUSamplerBindingType_Undefined = 0x00000001,
WGPUSamplerBindingType_Filtering = 0x00000002,
WGPUSamplerBindingType_NonFiltering = 0x00000003,
WGPUSamplerBindingType_Comparison = 0x00000004,
WGPUSamplerBindingType_Filtering = 0x00000001,
WGPUSamplerBindingType_NonFiltering = 0x00000002,
WGPUSamplerBindingType_Comparison = 0x00000003,
WGPUSamplerBindingType_Force32 = 0x7FFFFFFF
} WGPUSamplerBindingType WGPU_ENUM_ATTRIBUTE;

Expand Down Expand Up @@ -797,17 +789,13 @@ typedef enum WGPUStorageTextureAccess {
* `0x00000000`.
* Indicates that this @ref WGPUStorageTextureBindingLayout member of
* its parent @ref WGPUBindGroupLayoutEntry is not used.
* (See also @ref SentinelValues.)
* (See also @ref SentinelValues. Note that unlike in JS, there is *no*
* `Undefined` value that would trivially-default to `WriteOnly`.)
*/
WGPUStorageTextureAccess_BindingNotUsed = 0x00000000,
/**
* `0x00000001`.
* Indicates no value is passed for this argument. See @ref SentinelValues.
*/
WGPUStorageTextureAccess_Undefined = 0x00000001,
WGPUStorageTextureAccess_WriteOnly = 0x00000002,
WGPUStorageTextureAccess_ReadOnly = 0x00000003,
WGPUStorageTextureAccess_ReadWrite = 0x00000004,
WGPUStorageTextureAccess_WriteOnly = 0x00000001,
WGPUStorageTextureAccess_ReadOnly = 0x00000002,
WGPUStorageTextureAccess_ReadWrite = 0x00000003,
WGPUStorageTextureAccess_Force32 = 0x7FFFFFFF
} WGPUStorageTextureAccess WGPU_ENUM_ATTRIBUTE;

Expand Down Expand Up @@ -997,19 +985,15 @@ typedef enum WGPUTextureSampleType {
* `0x00000000`.
* Indicates that this @ref WGPUTextureBindingLayout member of
* its parent @ref WGPUBindGroupLayoutEntry is not used.
* (See also @ref SentinelValues.)
* (See also @ref SentinelValues. Note that unlike in JS, there is *no*
* `Undefined` value that would trivially-default to `Float`.)
*/
WGPUTextureSampleType_BindingNotUsed = 0x00000000,
/**
* `0x00000001`.
* Indicates no value is passed for this argument. See @ref SentinelValues.
*/
WGPUTextureSampleType_Undefined = 0x00000001,
WGPUTextureSampleType_Float = 0x00000002,
WGPUTextureSampleType_UnfilterableFloat = 0x00000003,
WGPUTextureSampleType_Depth = 0x00000004,
WGPUTextureSampleType_Sint = 0x00000005,
WGPUTextureSampleType_Uint = 0x00000006,
WGPUTextureSampleType_Float = 0x00000001,
WGPUTextureSampleType_UnfilterableFloat = 0x00000002,
WGPUTextureSampleType_Depth = 0x00000003,
WGPUTextureSampleType_Sint = 0x00000004,
WGPUTextureSampleType_Uint = 0x00000005,
WGPUTextureSampleType_Force32 = 0x7FFFFFFF
} WGPUTextureSampleType WGPU_ENUM_ATTRIBUTE;

Expand Down Expand Up @@ -1077,16 +1061,12 @@ typedef enum WGPUVertexStepMode {
/**
* `0x00000000`.
* This @ref WGPUVertexBufferLayout is a "hole" in the @ref WGPUVertexState `buffers` array.
* (See also @ref SentinelValues.)
* (See also @ref SentinelValues. Note that unlike in JS, there is *no*
* `Undefined` value that would trivially-default to `Vertex`.)
*/
WGPUVertexStepMode_VertexBufferNotUsed = 0x00000000,
/**
* `0x00000001`.
* Indicates no value is passed for this argument. See @ref SentinelValues.
*/
WGPUVertexStepMode_Undefined = 0x00000001,
WGPUVertexStepMode_Vertex = 0x00000002,
WGPUVertexStepMode_Instance = 0x00000003,
WGPUVertexStepMode_Vertex = 0x00000001,
WGPUVertexStepMode_Instance = 0x00000002,
WGPUVertexStepMode_Force32 = 0x7FFFFFFF
} WGPUVertexStepMode WGPU_ENUM_ATTRIBUTE;

Expand Down
25 changes: 10 additions & 15 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,8 @@ enums:
doc: |
Indicates that this @ref WGPUBufferBindingLayout member of
its parent @ref WGPUBindGroupLayoutEntry is not used.
(See also @ref SentinelValues.)
- name: undefined
doc: Indicates no value is passed for this argument. See @ref SentinelValues.
(See also @ref SentinelValues. Note that unlike in JS, there is *no*
`Undefined` value that would trivially-default to `Uniform`.)
- name: uniform
doc: |
TODO
Expand Down Expand Up @@ -723,9 +722,8 @@ enums:
doc: |
Indicates that this @ref WGPUSamplerBindingLayout member of
its parent @ref WGPUBindGroupLayoutEntry is not used.
(See also @ref SentinelValues.)
- name: undefined
doc: Indicates no value is passed for this argument. See @ref SentinelValues.
(See also @ref SentinelValues. Note that unlike in JS, there is *no*
`Undefined` value that would trivially-default to `Filtering`.)
- name: filtering
doc: |
TODO
Expand Down Expand Up @@ -784,9 +782,8 @@ enums:
doc: |
Indicates that this @ref WGPUStorageTextureBindingLayout member of
its parent @ref WGPUBindGroupLayoutEntry is not used.
(See also @ref SentinelValues.)
- name: undefined
doc: Indicates no value is passed for this argument. See @ref SentinelValues.
(See also @ref SentinelValues. Note that unlike in JS, there is *no*
`Undefined` value that would trivially-default to `WriteOnly`.)
- name: write_only
doc: |
TODO
Expand Down Expand Up @@ -1155,9 +1152,8 @@ enums:
doc: |
Indicates that this @ref WGPUTextureBindingLayout member of
its parent @ref WGPUBindGroupLayoutEntry is not used.
(See also @ref SentinelValues.)
- name: undefined
doc: Indicates no value is passed for this argument. See @ref SentinelValues.
(See also @ref SentinelValues. Note that unlike in JS, there is *no*
`Undefined` value that would trivially-default to `Float`.)
- name: float
doc: |
TODO
Expand Down Expand Up @@ -1332,9 +1328,8 @@ enums:
- name: vertex_buffer_not_used
doc: |
This @ref WGPUVertexBufferLayout is a "hole" in the @ref WGPUVertexState `buffers` array.
(See also @ref SentinelValues.)
- name: undefined
doc: Indicates no value is passed for this argument. See @ref SentinelValues.
(See also @ref SentinelValues. Note that unlike in JS, there is *no*
`Undefined` value that would trivially-default to `Vertex`.)
- name: vertex
doc: |
TODO
Expand Down
Loading