Using Image2D From Buffer Extension

Published:09/11/2014   Last Updated:11/22/2015

Download DocumentDownload Zip

The goal of this sample is to demonstrate how to connect buffer-based kernel and image-based kernel into pipeline using the cl_khr_image2d_from_buffer extension. This feature is supported as extension in OpenCL™ 1.2 and became core functionality in OpenCL 2.0, so any 2.0 device must support it. The functionality enables creating OpenCL image objects, based on OpenCL buffer objects without extra coping, providing dual API to the same piece of memory. Once an image is created, you can use such image features as interpolation and border checking in one kernel, while continuing to access the same physical memory as a regular OpenCL buffer in another kernel.

Supported Devices: CPU, Intel Processor Graphics, Intel® Xeon Phi™ coprocessor
Supported OS: Windows* OS
Complexity Level: Novice

For more information about the sample refer to the sample documentation inside the package.

* OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at