diff --git a/CHANGELOG.md b/CHANGELOG.md index 3aea6d9c37..cdcbcd72a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log +## Unreleased + - Fixed: + - `Device::create_query_set` would return an error when creating exactly `QUERY_SET_MAX_QUERIES` (8192) queries. Now it only returns an error when trying to create *more* than `QUERY_SET_MAX_QUERIES` queries. + ## v0.9 (2021-06-18) - Updated: - naga to `v0.5`. diff --git a/wgpu-core/src/device/mod.rs b/wgpu-core/src/device/mod.rs index 0216cd8ee1..a1a861bbfc 100644 --- a/wgpu-core/src/device/mod.rs +++ b/wgpu-core/src/device/mod.rs @@ -2292,7 +2292,7 @@ impl Device { return Err(Error::ZeroCount); } - if desc.count >= wgt::QUERY_SET_MAX_QUERIES { + if desc.count > wgt::QUERY_SET_MAX_QUERIES { return Err(Error::TooManyQueries { count: desc.count, maximum: wgt::QUERY_SET_MAX_QUERIES,