WebGPU: Skip copy in Queue::write_buffer (#9018)

This commit is contained in:
Tom Schuster authored and GitHub committed 2026-02-08 08:55:08 -05:00
1 parent 84af1a4beb
commit 34f4cda959
1 file changed
+2 -11
+2 -11
View File
@@ -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,
)