Image#
oneAPI Level Zero Specification - Version 1.18.31
Image Functions#
zeImageGetProperties#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeImageGetProperties(ze_device_handle_t hDevice, const ze_image_desc_t *desc, ze_image_properties_t *pImageProperties)#
Retrieves supported properties of an image.
The application may call this function from simultaneous threads.
The implementation of this function should be lock-free.
- Parameters:
hDevice – [in] handle of the device
desc – [in] pointer to image descriptor
pImageProperties – [out] pointer to image properties
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hDevice
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == descnullptr == pImageProperties
ZE_RESULT_ERROR_INVALID_ENUMERATION
0x3 < desc->flagsZE_IMAGE_TYPE_BUFFER < desc->type
zeImageCreate#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeImageCreate(ze_context_handle_t hContext, ze_device_handle_t hDevice, const ze_image_desc_t *desc, ze_image_handle_t *phImage)#
Creates an image on the context.
The application must only use the image for the device, or its sub-devices, which was provided during creation.
The application may call this function from simultaneous threads.
The implementation of this function must be thread-safe.
Remark
Analogues
clCreateImage
- Parameters:
hContext – [in] handle of the context object
hDevice – [in] handle of the device
desc – [in] pointer to image descriptor
phImage – [out] pointer to handle of image object created
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hContextnullptr == hDevice
ZE_RESULT_ERROR_INVALID_NULL_POINTER
nullptr == descnullptr == phImage
ZE_RESULT_ERROR_INVALID_ENUMERATION
0x3 < desc->flagsZE_IMAGE_TYPE_BUFFER < desc->type
zeImageDestroy#
Added in version 1.0
-
ZE_APIEXPORT ze_result_t ZE_APICALL zeImageDestroy(ze_image_handle_t hImage)#
Deletes an image object.
The application must ensure the device is not currently referencing the image before it is deleted.
The implementation of this function may immediately free all Host and Device allocations associated with this image.
The application must not call this function from simultaneous threads with the same image handle.
The implementation of this function must be thread-safe.
- Parameters:
hImage – [in][release] handle of image object to destroy
- Returns:
ZE_RESULT_ERROR_INVALID_NULL_HANDLE
nullptr == hImage
Image Enums#
ze_image_flags_t#
Added in version 1.0
ze_image_type_t#
Added in version 1.0
-
enum ze_image_type_t#
Supported image types.
Values:
-
enumerator ZE_IMAGE_TYPE_1D#
1D
-
enumerator ZE_IMAGE_TYPE_1DARRAY#
1D array
-
enumerator ZE_IMAGE_TYPE_2D#
2D
-
enumerator ZE_IMAGE_TYPE_2DARRAY#
2D array
-
enumerator ZE_IMAGE_TYPE_3D#
3D
-
enumerator ZE_IMAGE_TYPE_BUFFER#
Buffer.
-
enumerator ZE_IMAGE_TYPE_FORCE_UINT32#
Value marking end of ZE_IMAGE_TYPE_* ENUMs.
-
enumerator ZE_IMAGE_TYPE_1D#
ze_image_format_layout_t#
Added in version 1.0
-
enum ze_image_format_layout_t#
Supported image format layouts.
Values:
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_8#
8-bit single component layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_16#
16-bit single component layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_32#
32-bit single component layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_8_8#
2-component 8-bit layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_8_8_8_8#
4-component 8-bit layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_16_16#
2-component 16-bit layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_16_16_16_16#
4-component 16-bit layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_32_32#
2-component 32-bit layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_32_32_32_32#
4-component 32-bit layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_10_10_10_2#
4-component 10_10_10_2 layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_11_11_10#
3-component 11_11_10 layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_5_6_5#
3-component 5_6_5 layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_5_5_5_1#
4-component 5_5_5_1 layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_4_4_4_4#
4-component 4_4_4_4 layout
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_Y8#
Media Format: Y8. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_NV12#
Media Format: NV12. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_YUYV#
Media Format: YUYV. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_VYUY#
Media Format: VYUY. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_YVYU#
Media Format: YVYU. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_UYVY#
Media Format: UYVY. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_AYUV#
Media Format: AYUV. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_P010#
Media Format: P010. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_Y410#
Media Format: Y410. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_P012#
Media Format: P012. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_Y16#
Media Format: Y16. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_P016#
Media Format: P016. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_Y216#
Media Format: Y216. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_P216#
Media Format: P216. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_P8#
Media Format: P8. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_YUY2#
Media Format: YUY2. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_A8P8#
Media Format: A8P8. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_IA44#
Media Format: IA44. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_AI44#
Media Format: AI44. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_Y416#
Media Format: Y416. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_Y210#
Media Format: Y210. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_I420#
Media Format: I420. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_YV12#
Media Format: YV12. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_400P#
Media Format: 400P. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_422H#
Media Format: 422H. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_422V#
Media Format: 422V. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_444P#
Media Format: 444P. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_RGBP#
Media Format: RGBP. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_BRGP#
Media Format: BRGP. Format type and swizzle is ignored for this.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_8_8_8#
3-component 8-bit layout (since v1.9)
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_16_16_16#
3-component 16-bit layout (since v1.9)
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_32_32_32#
3-component 32-bit layout (since v1.9)
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_FORCE_UINT32#
Value marking end of ZE_IMAGE_FORMAT_LAYOUT_* ENUMs.
-
enumerator ZE_IMAGE_FORMAT_LAYOUT_8#
ze_image_format_type_t#
Added in version 1.0
-
enum ze_image_format_type_t#
Supported image format types.
Values:
-
enumerator ZE_IMAGE_FORMAT_TYPE_UINT#
Unsigned integer.
-
enumerator ZE_IMAGE_FORMAT_TYPE_SINT#
Signed integer.
-
enumerator ZE_IMAGE_FORMAT_TYPE_UNORM#
Unsigned normalized integer.
-
enumerator ZE_IMAGE_FORMAT_TYPE_SNORM#
Signed normalized integer.
-
enumerator ZE_IMAGE_FORMAT_TYPE_FLOAT#
Float.
-
enumerator ZE_IMAGE_FORMAT_TYPE_FORCE_UINT32#
Value marking end of ZE_IMAGE_FORMAT_TYPE_* ENUMs.
-
enumerator ZE_IMAGE_FORMAT_TYPE_UINT#
ze_image_format_swizzle_t#
Added in version 1.0
-
enum ze_image_format_swizzle_t#
Supported image format component swizzle into channel.
Values:
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_R#
Red component.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_G#
Green component.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_B#
Blue component.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_A#
Alpha component.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_0#
Zero.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_1#
One.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_X#
Don’t care.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_D#
Depth Component.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_FORCE_UINT32#
Value marking end of ZE_IMAGE_FORMAT_SWIZZLE_* ENUMs.
-
enumerator ZE_IMAGE_FORMAT_SWIZZLE_R#
ze_image_sampler_filter_flags_t#
Added in version 1.0
-
enum ze_image_sampler_filter_flag_t#
Values:
-
enumerator ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT#
device supports point filtering
-
enumerator ZE_IMAGE_SAMPLER_FILTER_FLAG_LINEAR#
device supports linear filtering
-
enumerator ZE_IMAGE_SAMPLER_FILTER_FLAG_FORCE_UINT32#
Value marking end of ZE_IMAGE_SAMPLER_FILTER_FLAG_* ENUMs.
-
enumerator ZE_IMAGE_SAMPLER_FILTER_FLAG_POINT#
Image Structures#
ze_image_format_t#
Added in version 1.0
-
struct ze_image_format_t#
Image format.
Public Members
-
ze_image_format_layout_t layout#
[in] image format component layout (e.g. N-component layouts and media formats)
-
ze_image_format_type_t type#
[in] image format type
-
ze_image_format_swizzle_t x#
[in] image component swizzle into channel x
-
ze_image_format_swizzle_t y#
[in] image component swizzle into channel y
-
ze_image_format_swizzle_t z#
[in] image component swizzle into channel z
-
ze_image_format_swizzle_t w#
[in] image component swizzle into channel w
-
ze_image_format_layout_t layout#
ze_image_desc_t#
Added in version 1.0
-
struct ze_image_desc_t#
Image descriptor.
Public Members
-
ze_structure_type_t stype#
[in] type of this structure
-
const void *pNext#
[in][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
-
ze_image_flags_t flags#
[in] creation flags. must be 0 (default) or a valid combination of ze_image_flag_t; default is read-only, cached access.
-
ze_image_type_t type#
[in] image type. Media format layouts are unsupported for ZE_IMAGE_TYPE_BUFFER
-
ze_image_format_t format#
[in] image format
-
uint64_t width#
[in] width dimension. ZE_IMAGE_TYPE_BUFFER: size in bytes; see the
maxImageBufferSizemember of ze_device_image_properties_t for limits. ZE_IMAGE_TYPE_1D, ZE_IMAGE_TYPE_1DARRAY: width in pixels; see themaxImageDims1Dmember of ze_device_image_properties_t for limits. ZE_IMAGE_TYPE_2D, ZE_IMAGE_TYPE_2DARRAY: width in pixels; see themaxImageDims2Dmember of ze_device_image_properties_t for limits. ZE_IMAGE_TYPE_3D: width in pixels; see themaxImageDims3Dmember of ze_device_image_properties_t for limits.
-
uint32_t height#
[in] height dimension. ZE_IMAGE_TYPE_2D, ZE_IMAGE_TYPE_2DARRAY: height in pixels; see the
maxImageDims2Dmember of ze_device_image_properties_t for limits. ZE_IMAGE_TYPE_3D: height in pixels; see themaxImageDims3Dmember of ze_device_image_properties_t for limits. other: ignored.
-
uint32_t depth#
[in] depth dimension. ZE_IMAGE_TYPE_3D: depth in pixels; see the
maxImageDims3Dmember of ze_device_image_properties_t for limits. other: ignored.
-
uint32_t arraylevels#
[in] array levels. ZE_IMAGE_TYPE_1DARRAY, ZE_IMAGE_TYPE_2DARRAY: see the
maxImageArraySlicesmember of ze_device_image_properties_t for limits. other: ignored.
-
uint32_t miplevels#
[in] mipmap levels (must be 0)
-
ze_structure_type_t stype#
ze_image_properties_t#
Added in version 1.0
-
struct ze_image_properties_t#
Image properties.
Public Members
-
ze_structure_type_t stype#
[in] type of this structure
-
void *pNext#
[in,out][optional] must be null or a pointer to an extension-specific structure (i.e. contains stype and pNext).
-
ze_image_sampler_filter_flags_t samplerFilterFlags#
[out] supported sampler filtering. returns 0 (unsupported) or a combination of ze_image_sampler_filter_flag_t.
-
ze_structure_type_t stype#