Add GPUSampler to WebGPU implementation

Add dom_struct and webidl for GPUSampler, implement GPUDevice.createSampler() method.
This commit is contained in:
Kunal Mohan 2020-05-23 22:04:09 +05:30
parent 43f29fe0ce
commit dd04716b85
9 changed files with 318 additions and 142 deletions

View file

@ -160,7 +160,7 @@ use uuid::Uuid;
use webgpu::{
wgpu::command::RawPass, WebGPU, WebGPUAdapter, WebGPUBindGroup, WebGPUBindGroupLayout,
WebGPUBuffer, WebGPUCommandBuffer, WebGPUCommandEncoder, WebGPUComputePipeline, WebGPUDevice,
WebGPUPipelineLayout, WebGPUQueue, WebGPUShaderModule,
WebGPUPipelineLayout, WebGPUQueue, WebGPUSampler, WebGPUShaderModule,
};
use webrender_api::{DocumentId, ImageKey};
use webxr_api::SwapChainId as WebXRSwapChainId;
@ -559,6 +559,7 @@ unsafe_no_jsmanaged_fields!(WebGPUComputePipeline);
unsafe_no_jsmanaged_fields!(WebGPUPipelineLayout);
unsafe_no_jsmanaged_fields!(WebGPUQueue);
unsafe_no_jsmanaged_fields!(WebGPUShaderModule);
unsafe_no_jsmanaged_fields!(WebGPUSampler);
unsafe_no_jsmanaged_fields!(WebGPUCommandBuffer);
unsafe_no_jsmanaged_fields!(WebGPUCommandEncoder);
unsafe_no_jsmanaged_fields!(WebGPUDevice);