mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-23 16:01:04 +01:00
WebGPU: Skip copy in Queue::write_buffer (#9018)
This commit is contained in:
1 parent
84af1a4beb
commit
34f4cda959
1 file changed
+2
-11
@@ -2575,20 +2575,11 @@ impl dispatch::QueueInterface for WebQueue {
|
||||
data: &[u8],
|
||||
) {
|
||||
let buffer = buffer.as_webgpu();
|
||||
/* Skip the copy once gecko allows BufferSource instead of ArrayBuffer
|
||||
self.inner.write_buffer_with_f64_and_u8_array_and_f64_and_f64(
|
||||
&buffer.buffer,
|
||||
offset as f64,
|
||||
data,
|
||||
0f64,
|
||||
data.len() as f64,
|
||||
);
|
||||
*/
|
||||
self.inner
|
||||
.write_buffer_with_f64_and_buffer_source_and_f64_and_f64(
|
||||
.write_buffer_with_f64_and_u8_slice_and_f64_and_f64(
|
||||
&buffer.inner,
|
||||
offset as f64,
|
||||
&js_sys::Uint8Array::from(data).buffer(),
|
||||
data,
|
||||
0f64,
|
||||
data.len() as f64,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user