Skip to content

Commit

Permalink
Add WGPUStatus
Browse files Browse the repository at this point in the history
Not used yet.
The values are wrong (we intend to shift them to 1,2) but I'll fix that
along with the other enums because it may be a generator-wide change.

Issue: webgpu-native#115
  • Loading branch information
kainino0x committed Sep 21, 2024
1 parent 2b59747 commit 3e63db8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
12 changes: 12 additions & 0 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,18 @@ typedef enum WGPUSamplerBindingType {
WGPUSamplerBindingType_Force32 = 0x7FFFFFFF
} WGPUSamplerBindingType WGPU_ENUM_ATTRIBUTE;

/**
* Status code returned (synchronously) from many operations.
* Generally indicates an invalid input like an unknown enum value,
* unexpected null pointer, or struct chaining error.
* Read the function's documentation for specific error conditions.
*/
typedef enum WGPUStatus {
WGPUStatus_Success = 0x00000000,
WGPUStatus_Error = 0x00000001,
WGPUStatus_Force32 = 0x7FFFFFFF
} WGPUStatus WGPU_ENUM_ATTRIBUTE;

typedef enum WGPUStencilOperation {
WGPUStencilOperation_Keep = 0x00000000,
WGPUStencilOperation_Zero = 0x00000001,
Expand Down
11 changes: 11 additions & 0 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ constants:
TODO
typedefs: []
enums:
- name: status
doc: |
Status code returned (synchronously) from many operations.
Generally indicates an invalid input like an unknown enum value,
unexpected null pointer, or struct chaining error.
Read the function's documentation for specific error conditions.
entries:
- name: success
doc: ""
- name: error
doc: ""
- name: adapter_type
doc: |
TODO
Expand Down

0 comments on commit 3e63db8

Please sign in to comment.