Fix resolve range of resolveQuerySet on Metal

The second parameter of NSMakeRange(NSUInteger loc, NSUInteger len) is
length, here we just need to pass queryCount.

Bug: dawn:434
Change-Id: I3dfa82e523310258c81c45c4e1c3af80a3df8704
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This commit is contained in:
Li Hao 2021-10-11 09:09:22 +00:00 committed by Dawn LUCI CQ
parent 9a8099eb8b
commit daf1cdbb28
1 changed files with 1 additions and 2 deletions

View File

@ -933,8 +933,7 @@ namespace dawn_native { namespace metal {
if (@available(macos 10.15, iOS 14.0, *)) {
[commandContext->EnsureBlit()
resolveCounters:querySet->GetCounterSampleBuffer()
inRange:NSMakeRange(cmd->firstQuery,
cmd->firstQuery + cmd->queryCount)
inRange:NSMakeRange(cmd->firstQuery, cmd->queryCount)
destinationBuffer:destination->GetMTLBuffer()
destinationOffset:NSUInteger(cmd->destinationOffset)];
} else {