From d5e28625dfc704cd3acdfdad4bffe5bc12f00337 Mon Sep 17 00:00:00 2001 From: kainino0x Date: Sat, 4 Jan 2025 06:39:08 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=2009e2b?= =?UTF-8?q?6a3c70a16c4416453d057c407929bc5c2fe=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sample/workloadSimulator/index.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sample/workloadSimulator/index.html b/sample/workloadSimulator/index.html index 7b185b8f..b82c22bd 100644 --- a/sample/workloadSimulator/index.html +++ b/sample/workloadSimulator/index.html @@ -551,7 +551,8 @@

Web graphics workload simulator

// We want to actually use this data in rendering so the graphics driver // can't optimize away the upload. Fill the first few bytes with our real // vertex data. - bufferDataArray.set(vertices, 0); + if (bufferDataArray.length > 0) + bufferDataArray.set(vertices, 0); } } @@ -563,7 +564,8 @@

Web graphics workload simulator

if (mapAsyncArray.length * 4 != mapAsync.value * 1024 * 1024) { mapAsyncArray = new Float32Array(mapAsync.value * 1024 * 1024 / 4); - mapAsyncArray.set(vertices, 0); + if (mapAsyncArray.length > 0) + mapAsyncArray.set(vertices, 0); } // Calculate how many instances and draw calls we need based on slider values.