mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Record validation error in mapAsync()
This commit is contained in:
parent
cd8d9162e6
commit
8eff1d74de
2 changed files with 24 additions and 7 deletions
|
@ -67,6 +67,8 @@ pub enum WebGPURequest {
|
|||
BufferMapAsync {
|
||||
sender: IpcSender<WebGPUResponseResult>,
|
||||
buffer_id: id::BufferId,
|
||||
device_id: id::DeviceId,
|
||||
scope_id: Option<u64>,
|
||||
host_map: HostMap,
|
||||
map_range: std::ops::Range<u64>,
|
||||
},
|
||||
|
@ -407,6 +409,8 @@ impl<'a> WGPU<'a> {
|
|||
WebGPURequest::BufferMapAsync {
|
||||
sender,
|
||||
buffer_id,
|
||||
device_id,
|
||||
scope_id,
|
||||
host_map,
|
||||
map_range,
|
||||
} => {
|
||||
|
@ -456,11 +460,12 @@ impl<'a> WGPU<'a> {
|
|||
};
|
||||
let global = &self.global;
|
||||
let result = gfx_select!(buffer_id => global.buffer_map_async(buffer_id, map_range, operation));
|
||||
if let Err(e) = result {
|
||||
if let Err(ref e) = result {
|
||||
if let Err(w) = sender.send(Err(format!("{:?}", e))) {
|
||||
warn!("Failed to send BufferMapAsync Response ({:?})", w);
|
||||
}
|
||||
}
|
||||
self.send_result(device_id, scope_id, result);
|
||||
},
|
||||
WebGPURequest::BufferMapComplete(buffer_id) => {
|
||||
self.buffer_maps.remove(&buffer_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue