Only send mapping back on unmap when MapMode = WRITE (#34054)

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2024-10-29 19:42:07 +01:00 committed by GitHub
parent d5554235fe
commit 43d1601016
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 20 additions and 23 deletions

View file

@ -32,7 +32,7 @@ pub use {wgpu_core as wgc, wgpu_types as wgt};
use crate::identity::*;
use crate::render_commands::RenderCommand;
use crate::swapchain::WebGPUContextId;
use crate::{Error, ErrorFilter, WebGPUResponse, PRESENTATION_BUFFER_COUNT};
use crate::{Error, ErrorFilter, Mapping, WebGPUResponse, PRESENTATION_BUFFER_COUNT};
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
pub struct ContextConfiguration {
@ -276,10 +276,8 @@ pub enum WebGPURequest {
},
UnmapBuffer {
buffer_id: id::BufferId,
array_buffer: IpcSharedMemory,
write_back: bool,
offset: u64,
size: u64,
/// Return back mapping for writeback
mapping: Option<Mapping>,
},
WriteBuffer {
device_id: id::DeviceId,