summaryrefslogtreecommitdiffstats
path: root/xmrstak/backend/amd/amd_gpu
diff options
context:
space:
mode:
authorpsychocrypt <psychocryptHPC@gmail.com>2018-04-03 07:57:10 +0200
committerpsychocrypt <psychocryptHPC@gmail.com>2018-04-03 07:58:02 +0200
commite0fb17e9cfb448909c7ba77ee034a021c653db39 (patch)
tree0bcc291624e442c47ffd625c2f26c84ec9ac3010 /xmrstak/backend/amd/amd_gpu
parent6880be70a6b29a1c850f4a4603bbc38d0ca6d117 (diff)
downloadxmr-stak-e0fb17e9cfb448909c7ba77ee034a021c653db39.zip
xmr-stak-e0fb17e9cfb448909c7ba77ee034a021c653db39.tar.gz
AMD OpenCL: fix sumokoin
- fix that version argument was not passed to extended kernel parameters
Diffstat (limited to 'xmrstak/backend/amd/amd_gpu')
-rw-r--r--xmrstak/backend/amd/amd_gpu/gpu.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/xmrstak/backend/amd/amd_gpu/gpu.cpp b/xmrstak/backend/amd/amd_gpu/gpu.cpp
index 2973db4..006a7ed 100644
--- a/xmrstak/backend/amd/amd_gpu/gpu.cpp
+++ b/xmrstak/backend/amd/amd_gpu/gpu.cpp
@@ -926,7 +926,10 @@ size_t XMRSetJob(GpuContext* ctx, uint8_t* input, size_t input_len, uint64_t tar
return(ERR_OCL_API);
}
- if(miner_algo == cryptonight_heavy)
+ /* ATTENTION: if we miner cryptonight_heavy the kernel needs an additional parameter version.
+ * Do NOT use the variable `miner_algo` because this variable is changed dynamicly
+ */
+ if(::jconf::inst()->GetMiningAlgo() == cryptonight_heavy)
{
// version
if ((ret = clSetKernelArg(ctx->Kernels[0], 4, sizeof(cl_uint), &version)) != CL_SUCCESS)
@@ -975,7 +978,10 @@ size_t XMRSetJob(GpuContext* ctx, uint8_t* input, size_t input_len, uint64_t tar
return ERR_OCL_API;
}
}
- else if(miner_algo == cryptonight_heavy)
+ /* ATTENTION: if we miner cryptonight_heavy the kernel needs an additional parameter version.
+ * Do NOT use the variable `miner_algo` because this variable is changed dynamicly
+ */
+ else if(::jconf::inst()->GetMiningAlgo() == cryptonight_heavy)
{
// version
if ((ret = clSetKernelArg(ctx->Kernels[1], 3, sizeof(cl_uint), &version)) != CL_SUCCESS)
@@ -1035,7 +1041,10 @@ size_t XMRSetJob(GpuContext* ctx, uint8_t* input, size_t input_len, uint64_t tar
return(ERR_OCL_API);
}
- if(miner_algo == cryptonight_heavy)
+ /* ATTENTION: if we miner cryptonight_heavy the kernel needs an additional parameter version.
+ * Do NOT use the variable `miner_algo` because this variable is changed dynamicly
+ */
+ if(::jconf::inst()->GetMiningAlgo() == cryptonight_heavy)
{
// version
if ((ret = clSetKernelArg(ctx->Kernels[2], 7, sizeof(cl_uint), &version)) != CL_SUCCESS)
OpenPOWER on IntegriCloud