mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 14:58:01 +00:00
Reverted create_opencl_command_queue
This commit is contained in:
parent
f157dd9710
commit
1854e96a0e
24
ocl.c
24
ocl.c
@ -183,27 +183,13 @@ static bool get_opencl_bit_align_support(cl_device_id *device)
|
||||
return !!find;
|
||||
}
|
||||
|
||||
static cl_int create_opencl_command_queue(cl_command_queue *command_queue, cl_context *context, cl_device_id *device, const void *cq_properties)
|
||||
static cl_int create_opencl_command_queue(cl_command_queue *command_queue, cl_context *context, cl_device_id *device, cl_command_queue_properties cq_properties)
|
||||
{
|
||||
cl_int status;
|
||||
|
||||
if(get_opencl_version(*device) < 2.0) {
|
||||
*command_queue = clCreateCommandQueue(*context, *device, *((const cl_command_queue_properties *)cq_properties), &status);
|
||||
|
||||
// Didn't work, try again with no properties.
|
||||
if (status != CL_SUCCESS) {
|
||||
*command_queue = clCreateCommandQueue(*context, *device,
|
||||
cq_properties, &status);
|
||||
if (status != CL_SUCCESS) /* Try again without OOE enable */
|
||||
*command_queue = clCreateCommandQueue(*context, *device, 0, &status);
|
||||
}
|
||||
}
|
||||
else {
|
||||
*command_queue = clCreateCommandQueueWithProperties(*context, *device, (const cl_queue_properties *)cq_properties, &status);
|
||||
|
||||
// Didn't work, same deal.
|
||||
if (status != CL_SUCCESS) {
|
||||
*command_queue = clCreateCommandQueueWithProperties(*context, *device, 0, &status);
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
@ -270,7 +256,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize, algorithm_t *alg
|
||||
return NULL;
|
||||
}
|
||||
|
||||
status = create_opencl_command_queue(&clState->commandQueue, &clState->context, &devices[gpu], (const void *)&(cgpu->algorithm.cq_properties));
|
||||
status = create_opencl_command_queue(&clState->commandQueue, &clState->context, &devices[gpu], cgpu->algorithm.cq_properties);
|
||||
if (status != CL_SUCCESS) {
|
||||
applog(LOG_ERR, "Error %d: Creating Command Queue. (clCreateCommandQueue)", status);
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user