Browse Source

Allow use of config provided shaders count.

nfactor-troky^2
unknown 11 years ago
parent
commit
e82f938afa
  1. 6
      ocl.c

6
ocl.c

@ -383,9 +383,15 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize) @@ -383,9 +383,15 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
applog(LOG_ERR, "Error %d: Failed to clGetDeviceInfo when trying to get CL_DEVICE_MAX_COMPUTE_UNITS", status);
return NULL;
}
if (cgpu->shaders) {
clState->compute_shaders = cgpu->shaders;
}
else {
// AMD architechture got 64 compute shaders per compute unit.
// Source: http://www.amd.com/us/Documents/GCN_Architecture_whitepaper.pdf
clState->compute_shaders = compute_units * 64;
}
applog(LOG_DEBUG, "Max shaders calculated %d", (int)(clState->compute_shaders));
status = clGetDeviceInfo(devices[gpu], CL_DEVICE_MAX_MEM_ALLOC_SIZE , sizeof(cl_ulong), (void *)&cgpu->max_alloc, NULL);

Loading…
Cancel
Save