Skip to content

Commit

Permalink
Move nullability back outside of TimestampWrites
Browse files Browse the repository at this point in the history
Issue: 430, partially reverts 404
  • Loading branch information
kainino0x committed Nov 26, 2024
1 parent 7304549 commit 6a0970c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
16 changes: 8 additions & 8 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ typedef struct WGPUCompilationMessage {
typedef struct WGPUComputePassTimestampWrites {
WGPUChainedStruct const * nextInChain;
/**
* Query set to write timestamps to. Null if timestamps should not be recorded.
* Query set to write timestamps to.
*
* The `INIT` macro sets this to `NULL`.
*/
Expand Down Expand Up @@ -2496,7 +2496,7 @@ typedef struct WGPURenderPassMaxDrawCount {
typedef struct WGPURenderPassTimestampWrites {
WGPUChainedStruct const * nextInChain;
/**
* Query set to write timestamps to. Null if timestamps should not be recorded.
* Query set to write timestamps to.
*
* The `INIT` macro sets this to `NULL`.
*/
Expand Down Expand Up @@ -3486,9 +3486,9 @@ typedef struct WGPUComputePassDescriptor {
*/
WGPUStringView label;
/**
* The `INIT` macro sets this to @ref WGPU_COMPUTE_PASS_TIMESTAMP_WRITES_INIT.
* The `INIT` macro sets this to `NULL`.
*/
WGPUComputePassTimestampWrites timestampWrites;
WGPU_NULLABLE WGPUComputePassTimestampWrites const * timestampWrites;
} WGPUComputePassDescriptor WGPU_STRUCTURE_ATTRIBUTE;

/**
Expand All @@ -3497,7 +3497,7 @@ typedef struct WGPUComputePassDescriptor {
#define WGPU_COMPUTE_PASS_DESCRIPTOR_INIT _wgpu_MAKE_INIT_STRUCT(WGPUComputePassDescriptor, { \
/*.nextInChain=*/NULL _wgpu_COMMA \
/*.label=*/WGPU_STRING_VIEW_INIT _wgpu_COMMA \
/*.timestampWrites=*/WGPU_COMPUTE_PASS_TIMESTAMP_WRITES_INIT _wgpu_COMMA \
/*.timestampWrites=*/NULL _wgpu_COMMA \
})

/**
Expand Down Expand Up @@ -4002,9 +4002,9 @@ typedef struct WGPURenderPassDescriptor {
*/
WGPU_NULLABLE WGPUQuerySet occlusionQuerySet;
/**
* The `INIT` macro sets this to @ref WGPU_RENDER_PASS_TIMESTAMP_WRITES_INIT.
* The `INIT` macro sets this to `NULL`.
*/
WGPURenderPassTimestampWrites timestampWrites;
WGPU_NULLABLE WGPURenderPassTimestampWrites const * timestampWrites;
} WGPURenderPassDescriptor WGPU_STRUCTURE_ATTRIBUTE;

/**
Expand All @@ -4017,7 +4017,7 @@ typedef struct WGPURenderPassDescriptor {
/*.colorAttachments=*/NULL _wgpu_COMMA \
/*.depthStencilAttachment=*/NULL _wgpu_COMMA \
/*.occlusionQuerySet=*/NULL _wgpu_COMMA \
/*.timestampWrites=*/WGPU_RENDER_PASS_TIMESTAMP_WRITES_INIT _wgpu_COMMA \
/*.timestampWrites=*/NULL _wgpu_COMMA \
})

/**
Expand Down
8 changes: 6 additions & 2 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1824,14 +1824,16 @@ structs:
doc: |
TODO
type: struct.compute_pass_timestamp_writes
pointer: immutable
optional: true
- name: compute_pass_timestamp_writes
doc: |
TODO
type: base_in
members:
- name: query_set
doc: |
Query set to write timestamps to. Null if timestamps should not be recorded.
Query set to write timestamps to.
type: object.query_set
- name: beginning_of_pass_write_index
doc: |
Expand Down Expand Up @@ -2474,6 +2476,8 @@ structs:
doc: |
TODO
type: struct.render_pass_timestamp_writes
pointer: immutable
optional: true
- name: render_pass_max_draw_count
doc: |
TODO
Expand All @@ -2493,7 +2497,7 @@ structs:
members:
- name: query_set
doc: |
Query set to write timestamps to. Null if timestamps should not be recorded.
Query set to write timestamps to.
type: object.query_set
- name: beginning_of_pass_write_index
doc: |
Expand Down

0 comments on commit 6a0970c

Please sign in to comment.