'\" t .\" Title: clGetImageInfo .\" Author: The Khronos Group .\" Generator: DocBook XSL Stylesheets vsnapshot .\" Date: 01/14/2021 .\" Manual: OpenCL Manual .\" Source: The Khronos Group .\" Language: English .\" .TH "CLGETIMAGEINFO" "3clc" "01/14/2021" "The Khronos Group" "OpenCL Manual" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" clGetImageInfo \- Get information specific to an image object created with clCreateImage\&. .SH "" .HP \w'cl_intclGetImageInfo('u .BI "cl_intclGetImageInfo(cl_mem\ " "image" ", cl_image_info\ " "param_name" ", size_t\ " "param_value_size" ", void\ *" "param_value" ", size_t\ *" "param_value_size_ret" ");" .SH "PARAMETERS" .PP \fI image \fR .RS 4 Specifies the image object being queried\&. .RE .PP \fI param_name \fR .RS 4 Specifies the information to query\&. The list of supported \fIparam_name\fR types and the information returned in \fIparam_value\fR by \fBclGetImageInfo\fR is described in the table below\&. .RE .PP \fI param_value \fR .RS 4 A pointer to memory where the appropriate result being queried is returned\&. If \fIparam_value\fR is NULL, it is ignored\&. .RE .PP \fI param_value_size \fR .RS 4 Used to specify the size in bytes of memory pointed to by \fIparam_value\fR\&. This size must be ≥ size of return type as described in the table below\&. .TS allbox tab(:); lB lB lB. T{ cl_image_info T}:T{ Return Type T}:T{ Info\&. returned in \fIparam_value\fR T} .T& l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l l. T{ \fBCL_IMAGE_FORMAT\fR T}:T{ cl_image_format T}:T{ Return image format descriptor specified when \fIimage\fR is created with \fBclCreateImage\fR(3clc)\&. T} T{ \fBCL_IMAGE_ELEMENT_SIZE\fR T}:T{ size_t T}:T{ Return size of each element of the image memory object given by \fIimage\fR\&. An element is made up of \fIn\fR channels\&. The value of \fIn\fR is given in \fIcl_image_format\fR descriptor\&. T} T{ \fBCL_IMAGE_ROW_PITCH\fR T}:T{ size_t T}:T{ Return size in bytes of a row of elements of the image object given by \fIimage\fR\&. T} T{ \fBCL_IMAGE_SLICE_PITCH\fR T}:T{ size_t T}:T{ Return calculated slice pitch in bytes of a 2D slice for the 3D image object or size of each image in a 1D or 2D image array given by \fIimage\fR\&. For a 1D image, 1D image buffer and 2D image object return 0\&. T} T{ \fBCL_IMAGE_WIDTH\fR T}:T{ size_t T}:T{ Return width of image in pixels\&. T} T{ \fBCL_IMAGE_HEIGHT\fR T}:T{ size_t T}:T{ Return height of image in pixels\&. For a 1D image, 1D image buffer and 1D image array object, height = 0\&. T} T{ \fBCL_IMAGE_DEPTH\fR T}:T{ size_t T}:T{ Return depth of the image in pixels\&. For a 1D image, 1D image buffer, 2D image or 1D and 2D image array object, depth = 0\&. T} T{ \fBCL_IMAGE_ARRAY_SIZE\fR T}:T{ size_t T}:T{ Return number of images in the image array\&. If \fIimage\fR is not an image array, 0 is returned\&. T} T{ \fBCL_IMAGE_BUFFER\fR T}:T{ cl_mem T}:T{ Return buffer object associated with \fIimage\fR\&. T} T{ \fBCL_IMAGE_NUM_MIP_LEVELS\fR T}:T{ cl_uint T}:T{ Return num_mip_levels associated with \fIimage\fR\&. T} T{ \fBCL_IMAGE_NUM_SAMPLES\fR T}:T{ cl_uint T}:T{ Return num_samples associated with \fIimage\fR\&. T} T{ \fBCL_IMAGE_D3D10_SUBRESOURCE_KHR\fR T}:T{ ID3D10Resource * T}:T{ (if the \fBcl_khr_d3d10_sharing\fR(3clc) extension is enabled) If \fIimage\fR was created using \fBclCreateFromD3D10Texture2DKHR\fR(3clc) or \fBclCreateFromD3D10Texture3DKHR\fR(3clc), returns the \fIsubresource\fR argument specified when \fIimage\fR was created\&. T} T{ \fBCL_IMAGE_DX9_MEDIA_PLANE_KHR\fR T}:T{ cl_uint T}:T{ Returns the plane argument value specified when \fImemobj\fR is created using \fBclCreateFromDX9MediaSurfaceKHR\fR(3clc)\&. (If the \fBcl_khr_dx9_media_sharing\fR(3clc) extension is supported) T} T{ \fBCL_IMAGE_DX9_MEDIA_\- SURFACE_PLANE_KHR\fR T}:T{ cl_uint T}:T{ Returns the plane argument value specified when \fImemobj\fR is created using \fBclCreateFromDX9MediaSurfaceKHR\fR(3clc)\&. (If the \fBcl_khr_dx9_media_sharing\fR(3clc) extension is supported) T} T{ \fBCL_IMAGE_D3D11_\- SUBRESOURCE_KHR\fR T}:T{ ID3D11Resource * T}:T{ If the \fBcl_khr_d3d11_sharing\fR(3clc) extension is suported, If \fIimage\fR was created using \fBclCreateFromD3D11Texture2DKHR\fR(3clc), or \fBclCreateFromD3D11Texture3DKHR\fR(3clc), returns the \fIsubresource\fR argument specified when \fIimage\fR was created\&. T} .TE .sp 1 .RE .PP \fI param_value_size_ret \fR .RS 4 Returns the actual size in bytes of data being queried by \fIparam_value\fR\&. If \fIparam_value_size_ret\fR is NULL, it is ignored\&. .RE .SH "NOTES" .PP To get information that is common to all memory objects (buffer and image objects), use the \fBclGetMemObjectInfo\fR(3clc) function\&. .SH "ERRORS" .PP Returns CL_SUCCESS if the function is executed successfully\&. Otherwise, it returns one of the following errors: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_VALUE if \fIparam_name\fR is not valid, or if size in bytes specified by \fIparam_value_size\fR is < size of return type as described in the table above and \fIparam_value\fR is not NULL\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_MEM_OBJECT if \fIimage\fR is a not a valid image object\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_RESOURCES if there is a failure to allocate resources required by the OpenCL implementation on the device\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_OUT_OF_HOST_MEMORY if there is a failure to allocate resources required by the OpenCL implementation on the host\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_DX9_MEDIA_SURFACE_KHR if \fIparam_name\fR is \fBCL_IMAGE_DX9_MEDIA_PLANE_KHR\fR and \fIimage\fR was not created by the function \fBclCreateFromDX9MediaSurfaceKHR\fR(3clc)\&. (If the \fBcl_khr_dx9_media_sharing\fR(3clc) extension is supported) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_D3D10_RESOURCE_KHR if \fIparam_name\fR is \fBCL_MEM_D3D10_SUBRESOURCE_KHR\fR and \fIimage\fR was not created by the function \fBclCreateFromD3D10Texture2DKHR\fR(3clc) or \fBclCreateFromD3D10Texture3DKHR\fR(3clc)\&. (If the \fBcl_khr_d3d10_sharing\fR(3clc) extension is supported) .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} CL_INVALID_D3D11_RESOURCE_KHR if \fIparam_name\fR is \fBCL_MEM_D3D11_SUBRESOURCE_KHR\fR and \fIimage\fR was not created by the function \fBclCreateFromD3D11Texture2DKHR\fR(3clc) or \fBclCreateFromD3D11Texture3DKHR\fR(3clc)\&. (If the \fBcl_khr_d3d11_sharing\fR(3clc) extension is supported) .RE .SH "SPECIFICATION" .PP \m[blue]\fBOpenCL Specification\fR\m[]\&\s-2\u[1]\d\s+2 .SH "SEE ALSO" .PP \fBclGetMemObjectInfo\fR(3clc) .SH "AUTHORS" .PP \fBThe Khronos Group\fR .SH "COPYRIGHT" .br Copyright \(co 2007-2011 The Khronos Group Inc. .br 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. .sp .SH "NOTES" .IP " 1." 4 OpenCL Specification .RS 4 \%page 116, section 5.3.6 - Image Object Queries .RE