Initial implementation of GPUDevice for WebGPU

Added the WebIDL bindigs for GPUDevice, GPUObjectDescriptorBase, GPUDeviceDescriptor, GPUObjectBase
Implemented the `requestDevice` function of `GPUAdapter`
This commit is contained in:
Istvan Miklos 2019-11-12 12:56:57 +01:00
parent 7aa68c8fe7
commit b15d2bb7d7
11 changed files with 270 additions and 16 deletions

View file

@ -10,5 +10,25 @@ interface GPUAdapter {
//readonly attribute GPULimits limits; Dont expose higher limits for now.
// May reject with DOMException // TODO: DOMException("OperationError")?
// Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
Promise<GPUDevice> requestDevice(optional GPUDeviceDescriptor descriptor = {});
};
dictionary GPUDeviceDescriptor : GPUObjectDescriptorBase {
GPUExtensions extensions = {};
GPULimits limits = {};
};
dictionary GPUExtensions {
boolean anisotropicFiltering = false;
};
dictionary GPULimits {
unsigned long maxBindGroups = 4;
unsigned long maxDynamicUniformBuffersPerPipelineLayout = 8;
unsigned long maxDynamicStorageBuffersPerPipelineLayout = 4;
unsigned long maxSampledTexturesPerShaderStage = 16;
unsigned long maxSamplersPerShaderStage = 16;
unsigned long maxStorageBuffersPerShaderStage = 4;
unsigned long maxStorageTexturesPerShaderStage = 4;
unsigned long maxUniformBuffersPerShaderStage = 12;
};