Browse Source

Merge commit '584fc01' into cg_merges_20130513

Luke Dashjr 12 years ago
parent
commit
c53ea9c1a6
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ocl.c

+ 4 - 1
ocl.c

@@ -683,7 +683,10 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
 			cgpu->lookup_gap = cgpu->opt_lg;
 
 		if (!cgpu->opt_tc) {
-			cgpu->thread_concurrency = cgpu->max_alloc / 32768 / cgpu->lookup_gap;
+			unsigned int sixtyfours;
+
+			sixtyfours =  cgpu->max_alloc / 131072 / 64 - 1;
+			cgpu->thread_concurrency = sixtyfours * 64;
 			if (cgpu->shaders && cgpu->thread_concurrency > cgpu->shaders) {
 				cgpu->thread_concurrency -= cgpu->thread_concurrency % cgpu->shaders;
 				if (cgpu->thread_concurrency > cgpu->shaders * 5)