summaryrefslogtreecommitdiff
path: root/src/cl_enqueue.h
AgeCommit message (Collapse)AuthorFilesLines
2014-11-11License: adjust all license version to LGPL v2.1+.Zhigang Gong1-1/+1
To make the license statement consistent to each other, adjust all license versions to v2.1+. Thus beignet should have a pure LGPL v2.1+ license. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2014-10-24Make use of write enable flag for mem bo mapZhenyu Wang1-0/+1
Use drm/intel optimization for mem bo mapping in case of read or write. So we could be possibly waiting less. This also adds 'map_flags' check in clEnqueueMapBuffer/clEnqueueMapImage for actual read or write mapping. But currently leave clMapBufferIntel untouched which might break ABI/API. v2: Fix write_map flag in clEnqueueMapBuffer/clEnqueueMapImage. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Reviewed-by: "Guo, Yejun" <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-06-24implement API clEnqueueFillImage.Luo1-0/+1
enqueues a command to fill an image object with a specified color. fix typo cl_context_get_static_kernel_from_bin. v2: fix image 1d array bug. Signed-off-by: Luo <xionghu.luo@intel.com> Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-06-13Implement the clEnqueueMigrateMemObjects APIJunyan He1-0/+1
So far, we just support 1 device and no subdevices. So all the command queues should belong to the small context. There is no need to migrate the mem objects from one subcontext to another by now. We just do the checks and fill the event. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-06-13add [opencl-1.2] API clEnqueueBarrierWithWaitList.Luo1-0/+1
This command blocks command execution, that is, any following commands enqueued after it do not execute until it completes; API clEnqueueMarkerWithWaitList patch didn't push the latest, update in this patch. Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com> Signed-off-by: Luo <xionghu.luo@intel.com> Conflicts: src/cl_event.c
2014-06-13Implement the clEnqueueFillBuffer API.Junyan He1-0/+1
We use the floatn's assigment to do the copy. 128 pattern size is according to double16, and because the double problem on our platform, we use to float16 to handle this. unaligned cases is not optimized now, just use the char assigment. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-05-22Fix map gtt fail when memory object size is too large.Yang Rong1-0/+1
After max allocate size is changed to 256M, the large memory object would map gtt fail in some system. So when image size is large then 128M, disable tiling, and used normal map. But in function clEnqueueMapBuffer/Image, may still fail because unsync map. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-29Complete the feature of clGetEventProfilingInfo APIJunyan He1-1/+1
The profiling feature is now all supported. We use drm_intel_reg_read to get the current time of GPU when the event is queued and submitted, and use PIPI_CONTROL cmd to get the executing time of the GPU for kernel start and end. One trivial problem is that: The GPU timer counter is 36 bits with resolution of 80ns, so 2^36*80 = 5500s, about half an hour. Some test may last about 2~5 min and if it starts at about half an hour, this may cause a wrap back problem and cause the case fail. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-09-18Implement clEnqueueMarker and clEnqueueBarrier.Yang Rong1-2/+2
Add some event info to cl_command_queue. One is non-complete user events, used to block marker event and barrier. After these events become CL_COMPLETE, the events blocked by these events also become CL_COMPLETE, so marker event will also set to CL_COMPLETE. If there is no user events, need wait last event complete and set marker event to complete. Add barrier_index, for clEnqueueBarrier, point to user events, indicate the enqueue apis follow clEnqueueBarrier should wait on how many user events. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-09-13Implement api clEnqueueTask and clEnqueueNativeKernel.Yang Rong1-2/+4
Also refine the whole memcpy's condition in function cl_enqueue_read_buffer_rect and cl_enqueue_write_buffer_rect. V2: Add a mem_list to enqueue_data to fix utest error. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-09-09Add clEnqueueReadBufferRect api.Yang Rong1-12/+15
Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-08-12Add the empty functions of cl_enqueueXXX.Yang Rong1-0/+63
Copy from cl_enqueueXXX functions and comment out. This change is for trace only. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>