From: Chris Duncan Date: Tue, 11 Mar 2025 21:15:02 +0000 (-0700) Subject: Fix threshold comparison in compute shader. X-Git-Tag: v3.1.0~9^2~13 X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=04b7730da7753779e06644800816d32d38c88a30;p=nano-pow.git Fix threshold comparison in compute shader. --- 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; }