The message "Object is currently unavailable" is displayed while the debugger is performing kernel debugging, i.e. while you're stepping through the source code of an OpenCL kernel.
To view the content of buffers you need to pause execution while not debugging a kernel. This can be done in several ways. The 2 most simple ways are:
- Remove all breakpoints and while the program is executing, click the Break toolbar button or Debug->Break menu command (F6 keyboard shortcut).
- Add a breakpoint at an API call from the Add/Remove Breakpoints dialog (ALT+SHIFT+B). Execution will pause just before the selected API is called.
Thank you, adding a breakpoint to clEnqueNDRangeKernel is what I was looking for.