webgpu: Use wgpu's instead of string errors and update limits handling (#32925)

* Use wgpu specific errors

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixup expect

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* WIP

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Fix records erasing enforcerange

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* page can already be destroyed

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Support more limits

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Set good results

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Set OK (not PASS) expect CRASH

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* fixup expectation

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* bad expectations

https://github.com/gfx-rs/wgpu/issues/6075
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* set bad expectation

render bundleencoder needs to be rewritten

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-08-04 19:19:46 +02:00 committed by GitHub
parent b366a02318
commit 5e59988c87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 496 additions and 871 deletions

View file

@ -2427,8 +2427,9 @@ impl ScriptThread {
pipeline_id,
} => {
self.gpu_id_hub.free_device_id(device_id);
let global = self.documents.borrow().find_global(pipeline_id).unwrap();
global.remove_gpu_device(WebGPUDevice(device_id));
if let Some(global) = self.documents.borrow().find_global(pipeline_id) {
global.remove_gpu_device(WebGPUDevice(device_id));
} // page can already be destroyed
},
WebGPUMsg::FreeBuffer(id) => self.gpu_id_hub.free_buffer_id(id),
WebGPUMsg::FreePipelineLayout(id) => self.gpu_id_hub.free_pipeline_layout_id(id),