metal: fix query set result copies (#6322)

The NSRange expects length, not end element. See 9bbe74b1d3/src/lib.rs (L51)
This commit is contained in:
Dzmitry Malyshau 2024-09-25 00:22:38 -07:00 committed by GitHub
parent 8e787eb70a
commit 7074380945
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -490,7 +490,7 @@ impl crate::CommandEncoder for super::CommandEncoder {
wgt::QueryType::Timestamp => { wgt::QueryType::Timestamp => {
encoder.resolve_counters( encoder.resolve_counters(
set.counter_sample_buffer.as_ref().unwrap(), set.counter_sample_buffer.as_ref().unwrap(),
metal::NSRange::new(range.start as u64, range.end as u64), metal::NSRange::new(range.start as u64, (range.end - range.start) as u64),
&buffer.raw, &buffer.raw,
offset, offset,
); );