5.3.8. Specifying Mipmap Levels to Image Operations
5.3.8. 为图像操作指定Mipmap级别
When the cl_khr_mipmap_image extension is supported, the clEnqueueReadImage, clEnqueueWriteImage, clEnqueueMapImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, and clEnqueueFillImage functions described above can operate on mipmapped images.
当支持cl_khr_mipmap_image扩展时,上面描述的clEnqueueReadImage、clEnqueueWriteImage、clEnqueueMapImage、cl恩queueCopyImage、clNqueueCopyImageToBuffer、clEnQueueCopyBufferToImage和clEnqueueFillImage函数可以对mipmap映像进行操作。
The mipmap image level(s) to access for each command are determined from the origin parameter when accessing a single image (non-copy functions), or from the src_origin and dst_origin parameters when accessing two src_image and dst_image images (copy functions). The logic below applies to each of these parameters, with image and origin replaced by src_image and src_origin, or dst_image and dst_origin as appropriate:
每个命令要访问的mipmap图像级别是根据访问单个图像时的origin参数(非复制功能)确定的,或者根据访问两个src_image和dst_image图像时的src_origin和dst_origin参数确定的(复制功能)。以下逻辑适用于这些参数中的每一个,其中image和origin替换为src_image和src_origin,或dst_image和dst_origin(视情况而定):
-
If image is a 1D image, origin[1] specifies the mip level to use.
-
如果图像是1D图像,origin[1]指定要使用的mip级别。
-
If image is a 1D image array, origin[2] specifies the mip level to use.
-
如果图像是1D图像阵列,origin[2]指定要使用的mip级别。
-
If image is a 2D image, origin[2] specifies the mip level to use.
-
如果图像是2D图像,origin[2]指定要使用的mip级别。
-
If image is a 2D image array or a 3D image, origin[3] specifies the mip level to use.
-
如果图像是2D图像阵列或3D图像,origin[3]指定要使用的mip级别。