From c8e4ec33dd40d4022b21b165d1b2f0d14169f85f Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Feb 2014 22:54:16 +0100 Subject: [PATCH] Fixed tc_limit calculation. --- ocl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocl.c b/ocl.c index 3eb4f344..73ea6bda 100644 --- a/ocl.c +++ b/ocl.c @@ -496,7 +496,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) cgpu->thread_concurrency = sixtyfours * 64; if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) { cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders; - size_t tc_limit = cgpu->shaders * use_nscrypt ? 11 : 5; + size_t tc_limit = cgpu->shaders * (use_nscrypt ? 11 : 5); if (cgpu->thread_concurrency > tc_limit) cgpu->thread_concurrency = tc_limit; }