gpu: implement Dawn bufferGet*MappedRange
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
ac7941d23c
commit
1968805596
1 changed files with 11 additions and 10 deletions
|
|
@ -109,18 +109,20 @@ pub const Interface = gpu.Interface(struct {
|
||||||
|
|
||||||
// TODO: file a bug on Dawn docstrings, this returns null but is not documented as such.
|
// TODO: file a bug on Dawn docstrings, this returns null but is not documented as such.
|
||||||
pub inline fn bufferGetConstMappedRange(buffer: *gpu.Buffer, offset: usize, size: usize) ?*const anyopaque {
|
pub inline fn bufferGetConstMappedRange(buffer: *gpu.Buffer, offset: usize, size: usize) ?*const anyopaque {
|
||||||
_ = buffer;
|
return procs.bufferGetConstMappedRange.?(
|
||||||
_ = offset;
|
@ptrCast(c.WGPUBuffer, buffer),
|
||||||
_ = size;
|
offset,
|
||||||
unreachable;
|
size,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: file a bug on Dawn docstrings, this returns null but is not documented as such.
|
// TODO: file a bug on Dawn docstrings, this returns null but is not documented as such.
|
||||||
pub inline fn bufferGetMappedRange(buffer: *gpu.Buffer, offset: usize, size: usize) ?*anyopaque {
|
pub inline fn bufferGetMappedRange(buffer: *gpu.Buffer, offset: usize, size: usize) ?*anyopaque {
|
||||||
_ = buffer;
|
return procs.bufferGetMappedRange.?(
|
||||||
_ = offset;
|
@ptrCast(c.WGPUBuffer, buffer),
|
||||||
_ = size;
|
offset,
|
||||||
unreachable;
|
size,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn bufferGetSize(buffer: *gpu.Buffer) u64 {
|
pub inline fn bufferGetSize(buffer: *gpu.Buffer) u64 {
|
||||||
|
|
@ -656,8 +658,7 @@ pub const Interface = gpu.Interface(struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn querySetDestroy(query_set: *gpu.QuerySet) void {
|
pub inline fn querySetDestroy(query_set: *gpu.QuerySet) void {
|
||||||
_ = query_set;
|
procs.querySetDestroy.?(@ptrCast(c.WGPUQuerySet, query_set));
|
||||||
unreachable;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub inline fn querySetGetCount(query_set: *gpu.QuerySet) u32 {
|
pub inline fn querySetGetCount(query_set: *gpu.QuerySet) u32 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue