Writes data from host to target, or reads data from target to host. This topic only applies to Intel® 64 and IA-32 architectures targeting Intel® Graphics Technology.
Syntax
C++ Interface
int GfxImage2D::read();
int GfxImage2D::write();
int GfxSharedImage2D::read();
int GfxSharedImage2D::write();
C Interface
int _GFX_read_image_2d(GfxResourceHandle handle);
int _GFX_write_image_2d(GfxResourceHandle handle);
Description
These functions write image data from the host to the target, or read image data from the target to the host. They do nothing for shared 2D images.
For convenience and to enable similar usage patterns for shared and target images, creation of the internal image object for a target image also copies data from the host to the target, while destruction of the internal image object for target images copies data back from the target to the host, if it is not yet copied. This copy is safe because the destruction of an image object is possible only if the runtime shows that no offload task is using that image.