summaryrefslogtreecommitdiffstats
path: root/wgpu/src/backend.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-29 14:29:31 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-29 14:29:31 +0100
commit5f1eb43161d70b4ef157aae1ebc2b5fb25eb5b27 (patch)
tree9e266da4bc18dd34229cb2c58efe8529ba8fe3b4 /wgpu/src/backend.rs
parent0a97b9e37ae115bb0db33193c8a6b62590a3cd2c (diff)
downloadiced-5f1eb43161d70b4ef157aae1ebc2b5fb25eb5b27.tar.gz
iced-5f1eb43161d70b4ef157aae1ebc2b5fb25eb5b27.tar.bz2
iced-5f1eb43161d70b4ef157aae1ebc2b5fb25eb5b27.zip
Split big `Buffer` writes into multiple chunks
Diffstat (limited to '')
-rw-r--r--wgpu/src/backend.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs
index 20809373..6ccf4111 100644
--- a/wgpu/src/backend.rs
+++ b/wgpu/src/backend.rs
@@ -1,3 +1,4 @@
+use crate::buffer;
use crate::core::{Color, Size, Transformation};
use crate::graphics::backend;
use crate::graphics::color;
@@ -66,7 +67,9 @@ impl Backend {
// TODO: Resize belt smartly (?)
// It would be great if the `StagingBelt` API exposed methods
// for introspection to detect when a resize may be worth it.
- staging_belt: wgpu::util::StagingBelt::new(1024 * 100),
+ staging_belt: wgpu::util::StagingBelt::new(
+ buffer::MAX_WRITE_SIZE as u64,
+ ),
}
}