runtime: fix a gpgpu event and thread local gpgpu handling bug.
authorZhigang Gong <zhigang.gong@intel.com>
Thu, 3 Jul 2014 03:33:10 +0000 (11:33 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Thu, 3 Jul 2014 06:49:57 +0000 (14:49 +0800)
commit68cec04a5b9b44bf636b3eb0342cc2fac596814b
tree3e3ed9e1e37fa01aa19e227a2d097ba68c21af5d
parent809df2b3b59328c780fe8107edf6c8da07f460fc
runtime: fix a gpgpu event and thread local gpgpu handling bug.

When pending a command queue, we need to record the whole gpgpu
structure not just the batch buffer. For the following reason:

1. We need to keep those private buffer, for example those printf buffers.
2. We need to make sure this gpgpu will not be reused by other enqueuement.

v2:
Don't try to flush all user event attached to the queue.
Just need to flush the current event when doing command queue flush.

Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
13 files changed:
src/cl_api.c
src/cl_command_queue.c
src/cl_command_queue.h
src/cl_driver.h
src/cl_driver_defs.c
src/cl_enqueue.c
src/cl_event.c
src/cl_event.h
src/cl_thread.c
src/cl_thread.h
src/intel/intel_batchbuffer.c
src/intel/intel_batchbuffer.h
src/intel/intel_gpgpu.c