5.3.14.1. Restrictions on Depth/Stencil Images
5.3.14.1. 深度/模具图像的限制
Depth images with an image channel order of CL_DEPTH_STENCIL can only be created using the clCreateFromGLTexture API, and only when the cl_khr_gl_depth_images extension is supported.
只有在支持cl_khr_gl_depth_images扩展时,才能使用clCreateFromGLTexture API创建图像通道顺序为CL_Depth_STENCIL的深度图像。
For the image format given by channel order of CL_DEPTH_STENCIL and channel data type of CL_UNORM_INT24, the depth is stored as an unsigned normalized 24-bit value.
对于由通道顺序CL_DEPTH_STENCIL和通道数据类型CL_UNORM_INT24给出的图像格式,深度被存储为无符号归一化的24位值。
For the image format given by channel order of CL_DEPTH_STENCIL and channel data type of CL_FLOAT, each pixel is two 32-bit values. The depth is stored as a single precision floating-point value followed by the stencil which is stored as a 8-bit integer value.
对于由CL_DEPTH_STENCIL的通道顺序和CL_FLOAT的通道数据类型给出的图像格式,每个像素是两个32位值。深度存储为单精度浮点值,后面是存储为8位整数值的模具。
Such images appear in the ] Minimum List of Supported Image Formats, but only require read support, not write support.
这样的图像出现在]支持的图像格式的最小列表中,但只需要读取支持,而不需要写入支持。
The stencil value cannot be read or written using the read_imagef and write_imagef built-in functions in an OpenCL kernel.
无法使用OpenCL内核中的read_imagef和write_imagef内置函数读取或写入模具值。
Depth image objects with an image channel order of CL_DEPTH_STENCIL cannot be used as arguments to clEnqueueReadImage, clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapImage, and clEnqueueFillImage. Such use will return a CL_INVALID_OPERATION error.
图像通道顺序为CL_Depth_STENCIL的深度图像对象不能用作clEnqueueReadImage、clEnqueueWriteImage、clEqueueCopyImage、clEnqueueCopyImageToBuffer、clEnQueue CopyBufferToImage、clEnqueueMapImage和clEnqueueFillImage的参数。这样的使用将返回CL_INVALID_OPERATION错误。