ION buffer


        I want to konw,when i using ION buffer,how to update the data on GPU bufffer,which  twice or more! I create the buffer with clImportMemoryARM in the first time.And the src will updating,Did i need use mmap to update the data of GPU buffer?

  • Hello,

    Data consistency and visibility is managed by the OpenCL driver in that case. Each time you flush a group of kernels together the driver will make the GPU's view of the buffer(s) current before the work starts on the GPU and make sure the updates made by the GPU are visible in memory once the GPU work is complete. The only thing an application has to care about is to synchronise the execution of the GPU work with other accesses to the buffer (or underlying dma_buf allocation) in the system.

    Hope this helps.