mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Implement GPUBuffer.mapAsync and update wgpu-core
This commit is contained in:
parent
0afe412d63
commit
b74cea3a46
18 changed files with 514 additions and 433 deletions
|
@ -5,8 +5,8 @@
|
|||
// https://gpuweb.github.io/gpuweb/#gpubuffer
|
||||
[Exposed=(Window, DedicatedWorker), Serializable, Pref="dom.webgpu.enabled"]
|
||||
interface GPUBuffer {
|
||||
//Promise<ArrayBuffer> mapReadAsync();
|
||||
// Promise<ArrayBuffer> mapWriteAsync();
|
||||
Promise<void> mapAsync(GPUMapModeFlags mode, optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
|
||||
//ArrayBuffer getMappedRange(optional GPUSize64 offset = 0, optional GPUSize64 size = 0);
|
||||
void unmap();
|
||||
|
||||
void destroy();
|
||||
|
@ -16,10 +16,9 @@ GPUBuffer includes GPUObjectBase;
|
|||
dictionary GPUBufferDescriptor : GPUObjectDescriptorBase {
|
||||
required GPUSize64 size;
|
||||
required GPUBufferUsageFlags usage;
|
||||
boolean mappedAtCreation = false;
|
||||
};
|
||||
|
||||
typedef unsigned long long GPUSize64;
|
||||
|
||||
typedef unsigned long GPUBufferUsageFlags;
|
||||
|
||||
typedef sequence<any> GPUMappedBuffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue