mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Implement GPUQueue.writeBuffer and GPUQueue.writeTexture
This commit is contained in:
parent
8ef7f24541
commit
fae66089fa
7 changed files with 199 additions and 12 deletions
|
@ -20,5 +20,3 @@ dictionary GPUBufferDescriptor : GPUObjectDescriptorBase {
|
|||
};
|
||||
|
||||
typedef unsigned long long GPUSize64;
|
||||
|
||||
typedef sequence<any> GPUMappedBuffer;
|
||||
|
|
|
@ -7,12 +7,25 @@
|
|||
interface GPUQueue {
|
||||
void submit(sequence<GPUCommandBuffer> commandBuffers);
|
||||
|
||||
// GPUFence createFence(optional GPUFenceDescriptor descriptor = {});
|
||||
// void signal(GPUFence fence, unsigned long long signalValue);
|
||||
//GPUFence createFence(optional GPUFenceDescriptor descriptor = {});
|
||||
//void signal(GPUFence fence, GPUFenceValue signalValue);
|
||||
|
||||
// void copyImageBitmapToTexture(
|
||||
// GPUImageBitmapCopyView source,
|
||||
// GPUTextureCopyView destination,
|
||||
// GPUExtent3D copySize);
|
||||
[Throws] void writeBuffer(
|
||||
GPUBuffer buffer,
|
||||
GPUSize64 bufferOffset,
|
||||
/*[AllowShared]*/ ArrayBuffer data,
|
||||
optional GPUSize64 dataOffset = 0,
|
||||
optional GPUSize64 size);
|
||||
|
||||
[Throws] void writeTexture(
|
||||
GPUTextureCopyView destination,
|
||||
/*[AllowShared]*/ ArrayBuffer data,
|
||||
GPUTextureDataLayout dataLayout,
|
||||
GPUExtent3D size);
|
||||
|
||||
//void copyImageBitmapToTexture(
|
||||
// GPUImageBitmapCopyView source,
|
||||
// GPUTextureCopyView destination,
|
||||
// GPUExtent3D copySize);
|
||||
};
|
||||
GPUQueue includes GPUObjectBase;
|
||||
|
|
|
@ -92,3 +92,22 @@ dictionary GPUExtent3DDict {
|
|||
};
|
||||
typedef [EnforceRange] unsigned long GPUIntegerCoordinate;
|
||||
typedef (sequence<GPUIntegerCoordinate> or GPUExtent3DDict) GPUExtent3D;
|
||||
|
||||
dictionary GPUTextureCopyView {
|
||||
required GPUTexture texture;
|
||||
GPUIntegerCoordinate mipLevel = 0;
|
||||
GPUOrigin3D origin = {};
|
||||
};
|
||||
|
||||
dictionary GPUTextureDataLayout {
|
||||
GPUSize64 offset = 0;
|
||||
required GPUSize32 bytesPerRow;
|
||||
GPUSize32 rowsPerImage = 0;
|
||||
};
|
||||
|
||||
dictionary GPUOrigin3DDict {
|
||||
GPUIntegerCoordinate x = 0;
|
||||
GPUIntegerCoordinate y = 0;
|
||||
GPUIntegerCoordinate z = 0;
|
||||
};
|
||||
typedef (sequence<GPUIntegerCoordinate> or GPUOrigin3DDict) GPUOrigin3D;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue