cl_khr_gl_msaa_sharing

Extends the CL/GL sharing to support GL multi-sampled texture (color or depth).

#pragma OPENCL EXTENSION cl_khr_gl_msaa_sharing : enable

Description

This extension name is cl_khr_gl_msaa_sharing. This extension requires cl_khr_gl_depth_images.

This extension adds read_image and write_image functions to the Image Read and Write Functions.

Multi-sample CL image objects (MSAA) can only be read from a kernel. Multi-sample CL image objects cannot be used as arguments to clEnqueueReadImage , clEnqueueWriteImage, clEnqueueCopyImage, clEnqueueCopyImageToBuffer, clEnqueueCopyBufferToImage, clEnqueueMapImage and clEnqueueFillImage and will return a CL_INVALID_OPERATION error.

Add the following new data types to table 6.3 in section 6.1.3 of the OpenCL 2.1 specification (see otherDataTypes):

Type Description
image2d_msaa_t A 2D multi-sample color image. Refer to section 6.13.14 for a detailed description of the built-in functions that use this type.
image2d_array_msaa_t A 2D multi-sample color image array. Refer to section 6.13.14 for a detailed description of the built-in functions that use this type.
image2d_msaa_depth_t A 2D multi-sample depth image. Refer to section 6.13.14 for a detailed description of the built-in functions that use this type.
image2d_array_msaa_depth_t A 2D multi-sample depth image array. Refer to section 6.13.14 for a detailed description of the built-in functions that use this type.

NOTE: When a multisample image is accessed in a kernel, the access takes one vector of integers describing which pixel to fetch and an integer corresponding to the sample numbers describing which sample within the pixel to fetch. sample identifies the sample position in the multi-sample image.

For best performance, we recommend that sample be a literal value so it is known at compile time and the OpenCL compiler can perform appropriate optimizations for multisample reads on the device.

No standard sampling instructions are allowed on the multisample image. Accessing a coordinate outside the image and/or a sample that is outside the number of samples associated with each pixel in the image is undefined

Specification

OpenCL Specification

Also see

Image Read and Write Functions, clGetGLTextureInfo

Copyright © 2007-2015 The Khronos Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and/or associated documentation files (the "Materials"), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Materials, and to permit persons to whom the Materials are furnished to do so, subject to the condition that this copyright notice and permission notice shall be included in all copies or substantial portions of the Materials.