Specs say it's legal for implementations to use internal copies, and
the write synchronization seems to work. Fixes clCreateBuffer
(together with previous patches) and buffer-flags piglits.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Acked-by: Francisco Jerez <currojerez@riseup.net>
ctx(ctx), _flags(flags),
_size(size), _host_ptr(host_ptr),
_destroy_notify([]{}) {
- if (flags & CL_MEM_COPY_HOST_PTR)
+ if (flags & (CL_MEM_COPY_HOST_PTR | CL_MEM_USE_HOST_PTR))
data.append((char *)host_ptr, size);
}