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: Make TimestampWrites structs extensible, move nullability inside #404

Merged
merged 2 commits into from
Nov 13, 2024
Merged
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
12 changes: 10 additions & 2 deletions webgpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,10 @@ typedef struct WGPUCompilationMessage {
} WGPUCompilationMessage WGPU_STRUCTURE_ATTRIBUTE;

typedef struct WGPUComputePassTimestampWrites {
WGPUChainedStruct const * nextInChain;
/**
* Query set to write timestamps to. Null if timestamps should not be recorded.
*/
WGPUQuerySet querySet;
uint32_t beginningOfPassWriteIndex;
uint32_t endOfPassWriteIndex;
Expand Down Expand Up @@ -1656,6 +1660,10 @@ typedef struct WGPURenderPassMaxDrawCount {
} WGPURenderPassMaxDrawCount WGPU_STRUCTURE_ATTRIBUTE;

typedef struct WGPURenderPassTimestampWrites {
WGPUChainedStruct const * nextInChain;
/**
* Query set to write timestamps to. Null if timestamps should not be recorded.
*/
WGPUQuerySet querySet;
uint32_t beginningOfPassWriteIndex;
uint32_t endOfPassWriteIndex;
Expand Down Expand Up @@ -2015,7 +2023,7 @@ typedef struct WGPUComputePassDescriptor {
* This is a \ref NonNullInputString.
*/
WGPUStringView label;
WGPU_NULLABLE WGPUComputePassTimestampWrites const * timestampWrites;
WGPUComputePassTimestampWrites timestampWrites;
} WGPUComputePassDescriptor WGPU_STRUCTURE_ATTRIBUTE;

typedef struct WGPUDepthStencilState {
Expand Down Expand Up @@ -2172,7 +2180,7 @@ typedef struct WGPURenderPassDescriptor {
WGPURenderPassColorAttachment const * colorAttachments;
WGPU_NULLABLE WGPURenderPassDepthStencilAttachment const * depthStencilAttachment;
WGPU_NULLABLE WGPUQuerySet occlusionQuerySet;
WGPU_NULLABLE WGPURenderPassTimestampWrites const * timestampWrites;
WGPURenderPassTimestampWrites timestampWrites;
} WGPURenderPassDescriptor WGPU_STRUCTURE_ATTRIBUTE;

typedef struct WGPUVertexState {
Expand Down
12 changes: 4 additions & 8 deletions webgpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1815,16 +1815,14 @@ structs:
doc: |
TODO
type: struct.compute_pass_timestamp_writes
pointer: immutable
optional: true
- name: compute_pass_timestamp_writes
doc: |
TODO
type: standalone
type: base_in
members:
- name: query_set
doc: |
TODO
Query set to write timestamps to. Null if timestamps should not be recorded.
type: object.query_set
- name: beginning_of_pass_write_index
doc: |
Expand Down Expand Up @@ -2404,8 +2402,6 @@ structs:
doc: |
TODO
type: struct.render_pass_timestamp_writes
pointer: immutable
optional: true
- name: render_pass_max_draw_count
doc: |
TODO
Expand All @@ -2420,11 +2416,11 @@ structs:
- name: render_pass_timestamp_writes
doc: |
TODO
type: standalone
type: base_in
members:
- name: query_set
doc: |
TODO
Query set to write timestamps to. Null if timestamps should not be recorded.
type: object.query_set
- name: beginning_of_pass_write_index
doc: |
Expand Down
Loading