From: Chris Duncan Date: Thu, 9 Jan 2025 23:33:48 +0000 (-0800) Subject: Confirm success of reinitialization after a device loss. I wish iOS would just play... X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=0bb258c594276c941e203964e7021c97f4707028;p=libnemo.git Confirm success of reinitialization after a device loss. I wish iOS would just play nice but oh well for now. Get rid of useless logging and redundant reset call. --- diff --git a/src/lib/nano-pow/classes/gpu.ts b/src/lib/nano-pow/classes/gpu.ts index 36df721..89cb9a0 100644 --- a/src/lib/nano-pow/classes/gpu.ts +++ b/src/lib/nano-pow/classes/gpu.ts @@ -93,8 +93,7 @@ export class NanoPowGpu { }) } - static reset (loss?: GPUDeviceLostInfo): void { - if (loss) console.dir(loss) + static reset (): void { console.warn(`GPU device lost. Reinitializing...`) NanoPowGpu.#cpuBuffer?.destroy() NanoPowGpu.#gpuBuffer?.destroy() @@ -192,7 +191,6 @@ export class NanoPowGpu { this.#cpuBuffer.unmap() } catch (err) { console.warn(`Error getting data from GPU. ${err}`) - this.reset() return this.search(hash, threshold) } if (data == null) throw new Error(`Failed to get data from buffer.`)