gpu: update to latest webgpu.h API

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2023-06-18 20:18:39 -07:00 committed by Stephen Gutekanst
parent 74067bebed
commit fdd3270a0f
22 changed files with 201 additions and 161 deletions

View file

@ -10,7 +10,7 @@ pub const QuerySet = opaque {
type: QueryType,
count: u32,
pipeline_statistics: ?[*]const PipelineStatisticName = null,
pipeline_statistics_count: u32 = 0,
pipeline_statistics_count: usize = 0,
/// Provides a slightly friendlier Zig API to initialize this structure.
pub inline fn init(v: struct {
@ -25,7 +25,7 @@ pub const QuerySet = opaque {
.label = v.label,
.type = v.type,
.count = v.count,
.pipeline_statistics_count = if (v.pipeline_statistics) |e| @intCast(u32, e.len) else 0,
.pipeline_statistics_count = if (v.pipeline_statistics) |e| e.len else 0,
.pipeline_statistics = if (v.pipeline_statistics) |e| e.ptr else null,
};
}