From 243924ea5d59ccd18eacc356305a7973381c85d9 Mon Sep 17 00:00:00 2001
From: Chris Duncan <chris@zoso.dev>
Date: Tue, 7 Jan 2025 14:34:10 -0800
Subject: [PATCH] Upload new bundle for platform testing.

---
 global.min.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/global.min.js b/global.min.js
index 6b7a55a..0914734 100644
--- a/global.min.js
+++ b/global.min.js
@@ -3501,6 +3501,10 @@ var init_powgpu = __esm({
           }
           adapter.requestDevice().then((device) => {
             this.#device = device;
+            this.#device.lost.then((loss) => {
+              console.warn(`(${loss.reason}) ${loss.message}. Reinitializing device.`);
+              this.init();
+            });
             this.#uboBuffer = this.#device.createBuffer({
               size: 48,
               usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
@@ -3604,8 +3608,7 @@ var init_powgpu = __esm({
           await this.#cpuBuffer.mapAsync(GPUMapMode.READ);
           await this.#device.queue.onSubmittedWorkDone();
         } catch (err) {
-          console.warn(`Reinitializing after catching error ${err}`);
-          this.init();
+          console.warn(`Error getting data from GPU, retrying. ${err}`);
           return await this.search(hash2, threshold);
         }
         const data = new DataView(this.#cpuBuffer.getMappedRange());
-- 
2.34.1