gpu: update interface to latest webgpu headers
This commit is contained in:
parent
e4f2f08431
commit
a52c6e5f5c
11 changed files with 135 additions and 31 deletions
|
|
@ -13,6 +13,12 @@ pub const Buffer = opaque {
|
|||
read_only_storage = 0x00000003,
|
||||
};
|
||||
|
||||
pub const MapState = enum(u32) {
|
||||
unmapped = 0x00000000,
|
||||
pending = 0x00000001,
|
||||
mapped = 0x00000002,
|
||||
};
|
||||
|
||||
pub const MapAsyncStatus = enum(u32) {
|
||||
success = 0x00000000,
|
||||
err = 0x00000001,
|
||||
|
|
@ -69,6 +75,10 @@ pub const Buffer = opaque {
|
|||
Impl.bufferDestroy(buffer);
|
||||
}
|
||||
|
||||
pub inline fn getMapState(buffer: *Buffer) MapState {
|
||||
return Impl.bufferGetMapState(buffer);
|
||||
}
|
||||
|
||||
/// Default `offset_bytes`: 0
|
||||
/// Default `len`: `gpu.whole_map_size` / `std.math.maxint(usize)` (whole range)
|
||||
pub inline fn getConstMappedRange(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue