From f7a2bc57d5fb1a28c7a4193e965c523f8134d172 Mon Sep 17 00:00:00 2001 From: PCigales <58741513+PCigales@users.noreply.github.com> Date: Wed, 27 Dec 2023 21:09:35 +0100 Subject: [PATCH] Small improvement --- GPXTweaker.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/GPXTweaker.py b/GPXTweaker.py index cbcf8cb..015bcf4 100644 --- a/GPXTweaker.py +++ b/GPXTweaker.py @@ -8799,13 +8799,12 @@ class GPXTweakerWebInterfaceServer(): ' class WebGPUStats {\r\n' \ ' static get ptsws() {return 64;}\r\n' \ ' static get segsws() {return 8;}\r\n' \ - ' static get maxsbs() {return 1 << 27;}\r\n' \ ' constructor (mode, persistence) {\r\n' \ ' this.mode = mode;\r\n' \ ' this.persistence = persistence * 1000;\r\n' \ ' this.adapter = null;\r\n' \ ' this.device = null;\r\n' \ - ' this.lock = (mode != "tweaker" && mode != "explorer") ? Promise.resolve(undefined) : Promise.resolve(navigator.gpu?.requestAdapter()?.then((a) => {this.adapter = a; return a.requestDevice();})?.then((d) => {this.device = d; this.init(); this.calc();}));\r\n' \ + ' this.lock = (mode != "tweaker" && mode != "explorer") ? Promise.resolve(undefined) : Promise.resolve(navigator.gpu?.requestAdapter()?.then((a) => {this.adapter = a; return a.requestDevice({requiredLimits:{maxStorageBufferBindingSize: this.adapter.limits.maxStorageBufferBindingSize, maxBufferSize: this.adapter.limits.maxBufferSize},});})?.then((d) => {this.device = d; this.init(); this.calc();}));\r\n' \ ' }\r\n' \ ' init() {\r\n' \ ' const twmode = this.mode == "tweaker";\r\n' \ @@ -9191,7 +9190,7 @@ class GPXTweakerWebInterfaceServer(): ' if (this.timer != null) {clearTimeout(this.timer);}\r\n' \ ' const twmode = this.mode == "tweaker";\r\n' \ ' const _starts = (a instanceof Uint32Array) ? a : new Uint32Array(a);\r\n' \ - ' const maxp = (Math.min(this.device.limits.maxStorageBufferBindingSize, this.device.limits.maxBufferSize, WebGPUStats.maxsbs) / 16) | 0;\r\n' \ + ' const maxp = (Math.min(this.device.limits.maxStorageBufferBindingSize, this.device.limits.maxBufferSize) / 16) | 0;\r\n' \ ' const maxcw = this.adapter.limits.maxComputeWorkgroupsPerDimension;\r\n' \ ' const nbtsegs = _starts.length - 1;\r\n' \ ' const nbtpts = _starts[nbtsegs];\r\n' \