mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-10-23 06:38:43 +02:00
Fix GPU nicehash support
This commit is contained in:
@@ -170,7 +170,6 @@ void minethd::work_main()
|
||||
cryptonight_ctx* cpu_ctx;
|
||||
cpu_ctx = cpu::minethd::minethd_alloc_ctx();
|
||||
cn_hash_fun hash_fun = cpu::minethd::func_selector(::jconf::inst()->HaveHardwareAes(), true /*bNoPrefetch*/);
|
||||
pGpuCtx->Nonce = *(uint32_t*)(oWork.bWorkBlob + 39);
|
||||
globalStates::inst().iConsumeCnt++;
|
||||
|
||||
while (bQuit == 0)
|
||||
@@ -195,6 +194,9 @@ void minethd::work_main()
|
||||
uint32_t target = oWork.iTarget32;
|
||||
XMRSetJob(pGpuCtx, oWork.bWorkBlob, oWork.iWorkSize, target);
|
||||
|
||||
if(oWork.bNiceHash)
|
||||
pGpuCtx->Nonce = *(uint32_t*)(oWork.bWorkBlob + 39);
|
||||
|
||||
while(globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) == iJobNo)
|
||||
{
|
||||
//Allocate a new nonce every 16 rounds
|
||||
|
||||
@@ -195,7 +195,7 @@ void minethd::work_main()
|
||||
cryptonight_ctx* cpu_ctx;
|
||||
cpu_ctx = cpu::minethd::minethd_alloc_ctx();
|
||||
cn_hash_fun hash_fun = cpu::minethd::func_selector(::jconf::inst()->HaveHardwareAes(), true /*bNoPrefetch*/);
|
||||
uint32_t iNonce = *(uint32_t*)(oWork.bWorkBlob + 39);
|
||||
uint32_t iNonce;
|
||||
|
||||
globalStates::inst().iConsumeCnt++;
|
||||
|
||||
@@ -227,6 +227,9 @@ void minethd::work_main()
|
||||
|
||||
assert(sizeof(job_result::sJobID) == sizeof(pool_job::sJobID));
|
||||
|
||||
if(oWork.bNiceHash)
|
||||
iNonce = *(uint32_t*)(oWork.bWorkBlob + 39);
|
||||
|
||||
while(globalStates::inst().iGlobalJobNo.load(std::memory_order_relaxed) == iJobNo)
|
||||
{
|
||||
//Allocate a new nonce every 16 rounds
|
||||
|
||||
Reference in New Issue
Block a user