… | |
… | |
271 | ulong IV - Q |
271 | ulong IV - Q |
272 | float NV float f |
272 | float NV float f |
273 | half IV ushort S |
273 | half IV ushort S |
274 | double NV double d |
274 | double NV double d |
275 | |
275 | |
|
|
276 | =head2 GLX SUPPORT |
|
|
277 | |
|
|
278 | Due to the sad state that OpenGL support is in in Perl (mostly the OpenGL |
|
|
279 | module, which has little to no documentation and has little to no support |
|
|
280 | for glx), this module, as a special extension, treats context creation |
|
|
281 | properties C<OpenCL::GLX_DISPLAY_KHR> and C<OpenCL::GL_CONTEXT_KHR> |
|
|
282 | specially: If either or both of these are C<undef>, then the OpenCL |
|
|
283 | module tries to dynamically resolve C<glxGetCurrentDisplay> and |
|
|
284 | C<glxGetCurrentContext>, call these functions and use their return values |
|
|
285 | instead. |
|
|
286 | |
|
|
287 | For this to work, the OpenGL library must be loaded, a GLX context must |
|
|
288 | have been created and be made current, and C<dlsym> must be available and |
|
|
289 | capable of finding the function via C<RTLD_DEFAULT>. |
|
|
290 | |
276 | =head2 THE OpenCL PACKAGE |
291 | =head2 THE OpenCL PACKAGE |
277 | |
292 | |
278 | =over 4 |
293 | =over 4 |
279 | |
294 | |
280 | =item $int = OpenCL::errno |
295 | =item $int = OpenCL::errno |
… | |
… | |
859 | reference to an array of local work sizes, with the same number of |
874 | reference to an array of local work sizes, with the same number of |
860 | elements as @$global_work_size. |
875 | elements as @$global_work_size. |
861 | |
876 | |
862 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html> |
877 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueNDRangeKernel.html> |
863 | |
878 | |
864 | =item $ev = $queue->enqueue_marker |
879 | =item $ev = $queue->enqueue_marker ($wait_events...) |
865 | |
880 | |
866 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMarker.html> |
881 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueMarker.html> |
|
|
882 | |
|
|
883 | =item $ev = $queue->enqueue_acquire_gl_objects ([object, ...], $wait_events...) |
|
|
884 | |
|
|
885 | Enqueues a list (an array-ref of OpenCL::Memory objects) to be acquired |
|
|
886 | for subsequent OpenCL usage. |
|
|
887 | |
|
|
888 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueAcquireGLObjects.html> |
|
|
889 | |
|
|
890 | =item $ev = $queue->enqueue_release_gl_objects ([object, ...], $wait_events...) |
|
|
891 | |
|
|
892 | Enqueues a list (an array-ref of OpenCL::Memory objects) to be released |
|
|
893 | for subsequent OpenGL usage. |
|
|
894 | |
|
|
895 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueReleaseGLObjects.html> |
867 | |
896 | |
868 | =item $ev = $queue->enqueue_wait_for_events ($wait_events...) |
897 | =item $ev = $queue->enqueue_wait_for_events ($wait_events...) |
869 | |
898 | |
870 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWaitForEvents.html> |
899 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clEnqueueWaitForEvents.html> |
871 | |
900 | |
… | |
… | |
959 | =item $int = $mem->offset |
988 | =item $int = $mem->offset |
960 | |
989 | |
961 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result. |
990 | Calls C<clGetMemObjectInfo> with C<CL_MEM_OFFSET> and returns the result. |
962 | |
991 | |
963 | =for gengetinfo end mem |
992 | =for gengetinfo end mem |
|
|
993 | |
|
|
994 | =item ($type, $name) = $mem->gl_object_info |
|
|
995 | |
|
|
996 | Returns the OpenGL object type (e.g. OpenCL::GL_OBJECT_TEXTURE2D) and the |
|
|
997 | object "name" (e.g. the texture name) used to create this memory object. |
|
|
998 | |
|
|
999 | L<http://www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetGLObjectInfo.html> |
964 | |
1000 | |
965 | =back |
1001 | =back |
966 | |
1002 | |
967 | =head2 THE OpenCL::Buffer CLASS |
1003 | =head2 THE OpenCL::Buffer CLASS |
968 | |
1004 | |
… | |
… | |
1027 | =item $int = $image->depth |
1063 | =item $int = $image->depth |
1028 | |
1064 | |
1029 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result. |
1065 | Calls C<clGetImageInfo> with C<CL_IMAGE_DEPTH> and returns the result. |
1030 | |
1066 | |
1031 | =for gengetinfo end image |
1067 | =for gengetinfo end image |
|
|
1068 | |
|
|
1069 | =for gengetinfo begin gl_texture |
|
|
1070 | |
|
|
1071 | =item $GLenum = $gl_texture->target |
|
|
1072 | |
|
|
1073 | Calls C<clGetGLTextureInfo> with C<CL_GL_TEXTURE_TARGET> and returns the result. |
|
|
1074 | |
|
|
1075 | =item $GLint = $gl_texture->gl_mipmap_level |
|
|
1076 | |
|
|
1077 | Calls C<clGetGLTextureInfo> with C<CL_GL_MIPMAP_LEVEL> and returns the result. |
|
|
1078 | |
|
|
1079 | =for gengetinfo end gl_texture |
1032 | |
1080 | |
1033 | =back |
1081 | =back |
1034 | |
1082 | |
1035 | =head2 THE OpenCL::Sampler CLASS |
1083 | =head2 THE OpenCL::Sampler CLASS |
1036 | |
1084 | |