From 98b9687754dd5e9d30f897c8e4db9f39f03e7fe7 Mon Sep 17 00:00:00 2001 From: minus1ms <75856137+minus1ms@users.noreply.github.com> Date: Wed, 26 Feb 2025 08:18:04 -0800 Subject: [PATCH] [v24] decrement binding size to match with max buffer (#7217) --- CHANGELOG.md | 1 + wgpu-hal/src/auxil/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8818a53c..f688ff60c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Bottom level categories: #### Bug Fixes - Fix GLES renderpass clears causing violation of `max_color_attachments` limit. By @adrian17 in [#6994](https://github.com/gfx-rs/wgpu/pull/6994). - Fix a possible deadlock within `Queue::write_texture`. By @metamuffin in [#7004](https://github.com/gfx-rs/wgpu/pull/7004) +- Decrement `max_storage_buffer_binding_size` by 1 to match `max_buffer_size`. By @minus1ms in [#7217](https://github.com/gfx-rs/wgpu/pull/7217) ### v24.0.1 (2025-01-22) diff --git a/wgpu-hal/src/auxil/mod.rs b/wgpu-hal/src/auxil/mod.rs index 81358c596..5daacbf00 100644 --- a/wgpu-hal/src/auxil/mod.rs +++ b/wgpu-hal/src/auxil/mod.rs @@ -44,7 +44,7 @@ pub mod db { /// Interestingly, the index itself can't reach that high, because the minimum /// element size is 4 bytes, but the compiler toolchain still computes the /// offset at some intermediate point, internally, as i32. -pub const MAX_I32_BINDING_SIZE: u32 = 1 << 31; +pub const MAX_I32_BINDING_SIZE: u32 = (1 << 31) - 1; pub fn map_naga_stage(stage: naga::ShaderStage) -> wgt::ShaderStages { match stage {