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.
int _GFX_read_image_2d(GfxResourceHandle handle);
int _GFX_write_image_2d(GfxResourceHandle handle);
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.