]> git.pld-linux.org Git - packages/beignet.git/blob - beignet-accept-old-create-queue.patch
- merged some Debian patches
[packages/beignet.git] / beignet-accept-old-create-queue.patch
1 Description: Allow clCreateCommandQueue to create out-of-order queues
2
3 Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
4 Forwarded: https://lists.freedesktop.org/archives/beignet/2018-July/009215.html
5
6 --- a/src/cl_api_command_queue.c
7 +++ b/src/cl_api_command_queue.c
8 @@ -27,35 +27,11 @@ clCreateCommandQueue(cl_context context,
9                       cl_command_queue_properties properties,
10                       cl_int *errcode_ret)
11  {
12 -  cl_command_queue queue = NULL;
13 -  cl_int err = CL_SUCCESS;
14 -
15 -  do {
16 -    if (!CL_OBJECT_IS_CONTEXT(context)) {
17 -      err = CL_INVALID_CONTEXT;
18 -      break;
19 -    }
20 -
21 -    err = cl_devices_list_include_check(context->device_num, context->devices, 1, &device);
22 -    if (err)
23 -      break;
24 -
25 -    if (properties & ~(CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE | CL_QUEUE_PROFILING_ENABLE)) {
26 -      err = CL_INVALID_VALUE;
27 -      break;
28 -    }
29 -
30 -    if (properties & CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE) { /*not supported now.*/
31 -      err = CL_INVALID_QUEUE_PROPERTIES;
32 -      break;
33 -    }
34 -
35 -    queue = cl_create_command_queue(context, device, properties, 0, &err);
36 -  } while (0);
37 -
38 -  if (errcode_ret)
39 -    *errcode_ret = err;
40 -  return queue;
41 +  cl_queue_properties props[3];
42 +  props[0] = CL_QUEUE_PROPERTIES;
43 +  props[1] = properties;
44 +  props[2] = 0;
45 +  return clCreateCommandQueueWithProperties(context, device, props, errcode_ret);
46  }
47  
48  /* 2.0 new API for create command queue. */
This page took 0.028575 seconds and 3 git commands to generate.