mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 13:04:29 +00:00
The new phatk kernel needs a different nonce passed according to how many vectors are in use.
This fixes breakage that otherwise occurs when 1 or 4 vectors are chosen.
This commit is contained in:
parent
3edc1dfe2a
commit
64e7cdd61b
16
main.c
16
main.c
@ -3415,9 +3415,11 @@ static cl_int queue_poclbm_kernel(_clState *clState, dev_blk_ctx *blk)
|
||||
|
||||
static cl_int queue_phatk_kernel(_clState *clState, dev_blk_ctx *blk)
|
||||
{
|
||||
cl_kernel *kernel = &clState->kernel;
|
||||
cl_uint vwidth = clState->preferred_vwidth;
|
||||
cl_kernel *kernel = &clState->kernel;
|
||||
cl_int status = 0;
|
||||
int num = 0;
|
||||
int i, num = 0;
|
||||
uint *nonces;
|
||||
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->ctx_a);
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->ctx_b);
|
||||
@ -3434,11 +3436,11 @@ static cl_int queue_phatk_kernel(_clState *clState, dev_blk_ctx *blk)
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->cty_f);
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->cty_g);
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->cty_h);
|
||||
|
||||
uint nonces[2];
|
||||
nonces[0] = blk->nonce;
|
||||
nonces[1] = (blk->nonce)+1;
|
||||
status |= clSetKernelArg(*kernel, num++, 2 * sizeof(uint), (void *)nonces);
|
||||
|
||||
nonces = alloca(sizeof(uint) * vwidth);
|
||||
for (i = 0; i < vwidth; i++)
|
||||
nonces[i] = blk->nonce + i;
|
||||
status |= clSetKernelArg(*kernel, num++, vwidth * sizeof(uint), (void *)nonces);
|
||||
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->W16);
|
||||
status |= clSetKernelArg(*kernel, num++, sizeof(uint), (void *)&blk->W17);
|
||||
|
Loading…
x
Reference in New Issue
Block a user