The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Second is with mapping. From what I understand, the spec dictates that I unmap after using the host pointer, so for a loop I would map, write (or read), unmap, execute kernel, and then start over from the beginning:

No matter how I read the spec, I can only end up with the conclusion they violate it here. They map the buffer and leave it mapped. And while mapped they do clEnqueueWriteBuffer(). Citing the spec for clEnqueueMapBuffer: "The contents of the regions of a memory object mapped for writing (i.e. CL_MAP_WRITE is set in map_flags argument to clEnqueueMapBuffer or clEnqueueMapImage) are considered to be undefined until this region is unmapped. Reads and writes by a kernel executing on a device to a memory region(s) mapped for writing are undefined."

and "The behavior of OpenCL function calls that enqueue commands that write or copy to regions of a memory object that are mapped is undefined."

So are they teaching us to violate the spec or am I reading it wrong? The reason I ask is we have done it the "nvidia way" so far, but on several fresh versions of AMD drivers, this will segfault. If we change the code to the first, non-mapped, alternative above, it ceases to segfault.