From 9eccac9aba37e85fe71c77ce2ca0fcfb9ddbe828 Mon Sep 17 00:00:00 2001 From: John Owens Date: Thu, 17 Oct 2024 11:34:02 -0700 Subject: [PATCH] fails if timestamp-query is not supported --- timing-mre.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/timing-mre.html b/timing-mre.html index 64562a3..825cdb1 100644 --- a/timing-mre.html +++ b/timing-mre.html @@ -152,6 +152,12 @@ fail("Fatal error: Device does not support WebGPU."); } + if (!canTimestamp) { + fail( + 'Fatal error: Device does not support WebGPU timestamp query (`adapter.features.has("timestamp-query")` is false).' + ); + } + const workgroupSize = 64; const memsrcSize = 2 ** 24; const timingHelper = new TimingHelper(device);