Change ErrorScopeId type to NonZeroU64

And extract it from WebGPURequest
This commit is contained in:
Kunal Mohan 2020-08-03 01:45:29 +05:30
parent 8eff1d74de
commit ce6e09a3aa
17 changed files with 277 additions and 250 deletions

View file

@ -167,13 +167,15 @@ impl GPUTextureMethods for GPUTexture {
self.channel
.0
.send(WebGPURequest::CreateTextureView {
texture_id: self.texture.0,
texture_view_id,
device_id: self.device.id().0,
descriptor: desc,
.send((
scope_id,
})
WebGPURequest::CreateTextureView {
texture_id: self.texture.0,
texture_view_id,
device_id: self.device.id().0,
descriptor: desc,
},
))
.expect("Failed to create WebGPU texture view");
let texture_view = WebGPUTextureView(texture_view_id);
@ -191,7 +193,7 @@ impl GPUTextureMethods for GPUTexture {
if let Err(e) = self
.channel
.0
.send(WebGPURequest::DestroyTexture(self.texture.0))
.send((None, WebGPURequest::DestroyTexture(self.texture.0)))
{
warn!(
"Failed to send WebGPURequest::DestroyTexture({:?}) ({})",