Browse Source

Correct target value passed to scrypt kernel.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
e45ebb62a9
  1. 2
      driver-opencl.c
  2. 2
      scrypt120713.cl

2
driver-opencl.c

@ -1001,7 +1001,7 @@ static cl_int queue_scrypt_kernel(_clState *clState, dev_blk_ctx *blk, __maybe_u
cl_uint le_target; cl_uint le_target;
cl_int status = 0; cl_int status = 0;
le_target = ~swab32((uint32_t)blk->work->target[7]); le_target = ~swab32(*(cl_uint *)(blk->work->target + 28));
clState->cldata = blk->work->data; clState->cldata = blk->work->data;
status = clEnqueueWriteBuffer(clState->commandQueue, clState->CLbuffer0, true, 0, 80, clState->cldata, 0, NULL,NULL); status = clEnqueueWriteBuffer(clState->commandQueue, clState->CLbuffer0, true, 0, 80, clState->cldata, 0, NULL,NULL);

2
scrypt120713.cl

@ -724,7 +724,7 @@ const uint4 midstate0, const uint4 midstate16, const uint target)
SHA256_fixed(&tmp0,&tmp1); SHA256_fixed(&tmp0,&tmp1);
SHA256(&ostate0,&ostate1, tmp0, tmp1, (uint4)(0x80000000U, 0U, 0U, 0U), (uint4)(0U, 0U, 0U, 0x300U)); SHA256(&ostate0,&ostate1, tmp0, tmp1, (uint4)(0x80000000U, 0U, 0U, 0U), (uint4)(0U, 0U, 0U, 0x300U));
if (!(ostate1.w&target)) if (!(ostate1.w & target))
output[FOUND] = output[NFLAG & gid] = gid; output[FOUND] = output[NFLAG & gid] = gid;
} }

Loading…
Cancel
Save