From 961be24246f6cbb39b413dcd257ba9305b0c7fbd Mon Sep 17 00:00:00 2001 From: csmoe Date: Thu, 13 Nov 2025 00:53:45 +0800 Subject: [PATCH] Warn about Limits::max_non_sampler_bindings's default 1_000_000 (#8447) --- wgpu-types/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wgpu-types/src/lib.rs b/wgpu-types/src/lib.rs index 33d2bf1eb..7021c33f1 100644 --- a/wgpu-types/src/lib.rs +++ b/wgpu-types/src/lib.rs @@ -685,6 +685,11 @@ pub struct Limits { pub max_push_constant_size: u32, /// Maximum number of live non-sampler bindings. /// + ///
+ /// The default value is **1_000_000**, On systems with integrated GPUs (iGPUs)—particularly on Windows using the D3D12 + /// backend—this can lead to significant system RAM consumption since iGPUs share system memory directly with the CPU. + ///
+ /// /// This limit only affects the d3d12 backend. Using a large number will allow the device /// to create many bind groups at the cost of a large up-front allocation at device creation. pub max_non_sampler_bindings: u32,