From 04b7730da7753779e06644800816d32d38c88a30 Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 11 Mar 2025 14:15:02 -0700 Subject: [PATCH] Fix threshold comparison in compute shader. --- src/shaders/compute.wgsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shaders/compute.wgsl b/src/shaders/compute.wgsl index 989a616..54e7440 100644 --- a/src/shaders/compute.wgsl +++ b/src/shaders/compute.wgsl @@ -1624,7 +1624,7 @@ fn main(id: vec3) { * Set nonce if it passes the threshold and no other thread has set it. * Only high bits are needed for comparison since threshold low bits are zero. */ - if ((BLAKE2B_IV_0.y ^ v01.y ^ v89.y) > ubo.threshold && atomicLoad(&work.found) == 0u) { + if ((BLAKE2B_IV_0.y ^ v01.y ^ v89.y) >= ubo.threshold && atomicLoad(&work.found) == 0u) { atomicStore(&work.found, 1u); work.nonce = m0; } -- 2.34.1