From 99cdc539df724ced243c7258036385840b0067ca Mon Sep 17 00:00:00 2001 From: Austin Eng Date: Tue, 6 Dec 2022 02:24:49 +0000 Subject: [PATCH] Reduce kMaxQueryCount to 4096 Bug: gpuweb#3648 Change-Id: Ic0dc211a4338f42de1a533c0f18f8852d8af4d36 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/112445 Kokoro: Kokoro Reviewed-by: Corentin Wallez Commit-Queue: Austin Eng Reviewed-by: Kai Ninomiya --- src/dawn/common/Constants.h | 7 +++---- webgpu-cts/expectations.txt | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/dawn/common/Constants.h b/src/dawn/common/Constants.h index 027b6c0659..da7e001d70 100644 --- a/src/dawn/common/Constants.h +++ b/src/dawn/common/Constants.h @@ -55,10 +55,9 @@ static constexpr float kLodMax = 1000.0; // on macOS, but we decide to do it on all platforms. static constexpr uint64_t kCopyBufferToBufferOffsetAlignment = 4u; -// The maximum size of visibilityResultBuffer is 256KB on Metal, to fit the restriction, limit the -// maximum size of query set to 64KB. The size of a query is 8-bytes, the maximum query count is 64 -// * 1024 / 8. -static constexpr uint32_t kMaxQueryCount = 8192u; +// Metal has a maximum size of 32Kb for a counter set buffer. Each query is 8 bytes. +// So, the maximum nymber of queries is 32Kb / 8. +static constexpr uint32_t kMaxQueryCount = 4096; // An external texture occupies multiple binding slots. These are the per-external-texture bindings // needed. diff --git a/webgpu-cts/expectations.txt b/webgpu-cts/expectations.txt index 66dc69758c..9060751bb9 100644 --- a/webgpu-cts/expectations.txt +++ b/webgpu-cts/expectations.txt @@ -86,6 +86,10 @@ crbug.com/1309194 [ linux ] webgpu:web_platform,copyToTexture,canvas:copy_conten crbug.com/1309194 [ linux ] webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gl_context_canvas:* [ Skip ] crbug.com/1309194 [ linux ] webgpu:web_platform,copyToTexture,canvas:copy_contents_from_gpu_context_canvas:* [ Skip ] +# Limit value changed. gpuweb#3648 +webgpu:api,validation,query_set,create:count:type="occlusion" [ Failure ] +webgpu:api,validation,query_set,create:count:type="timestamp" [ Failure ] + ################################################################################ # web_platform crashes on SwiftShader # Skipped instead of just Crash because of the number of failures