Skip to content

Commit

Permalink
Support cl_intel_planar_yuv
Browse files Browse the repository at this point in the history
  • Loading branch information
Oblomov committed Jan 20, 2017
1 parent d1c9a8f commit 2bd2c79
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions man/clinfo.1
Expand Up @@ -96,6 +96,9 @@ for the version of the Intel Motion Estimation accelerator version;
.B cl_intel_device_side_avc_motion_estimation
for the version and supported features of Intel's device-side AVC Motion;
.TP
.B cl_intel_planar_yuv
for the maximum dimensions of planar YUV images;
.TP
.B cl_intel_simultaneous_sharing
for simultaneous CL/GL/DirectX context sharing (only partial support);
.TP
Expand Down
26 changes: 26 additions & 0 deletions src/clinfo.c
Expand Up @@ -569,6 +569,7 @@ struct device_info_checks {
char has_intel_local_thread[30];
char has_intel_AME[36];
char has_intel_AVC_ME[43];
char has_intel_planar_yuv[20];
char has_intel_required_subgroup_size[32];
char has_altera_dev_temp[29];
char has_spir[12];
Expand All @@ -594,6 +595,7 @@ DEFINE_EXT_CHECK(image2d_buffer)
DEFINE_EXT_CHECK(intel_local_thread)
DEFINE_EXT_CHECK(intel_AME)
DEFINE_EXT_CHECK(intel_AVC_ME)
DEFINE_EXT_CHECK(intel_planar_yuv)
DEFINE_EXT_CHECK(intel_required_subgroup_size)
DEFINE_EXT_CHECK(altera_dev_temp)
DEFINE_EXT_CHECK(spir)
Expand Down Expand Up @@ -713,6 +715,7 @@ void identify_device_extensions(const char *extensions, struct device_info_check
CHECK_EXT(intel_local_thread, cl_intel_exec_by_local_thread);
CHECK_EXT(intel_AME, cl_intel_advanced_motion_estimation);
CHECK_EXT(intel_AVC_ME, cl_intel_device_side_avc_motion_estimation);
CHECK_EXT(intel_planar_yuv, cl_intel_planar_yuv);
CHECK_EXT(intel_required_subgroup_size, cl_intel_required_subgroup_size);
CHECK_EXT(altera_dev_temp, cl_altera_device_temperature);
CHECK_EXT(qcom_ext_host_ptr, cl_qcom_ext_host_ptr);
Expand Down Expand Up @@ -980,6 +983,26 @@ int device_info_img_sz_2d(cl_device_id dev, cl_device_info param, const char *pn
return had_error;
}

int device_info_img_sz_intel_planar_yuv(cl_device_id dev, cl_device_info param, const char *pname,
const struct device_info_checks *chk UNUSED)
{
size_t width = 0, height = 0, val = 0;
GET_VAL; /* HEIGHT */
if (!had_error) {
height = val;
param = CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL;
current_param = "CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL";
GET_VAL;
if (!had_error) {
width = val;
sprintf(strbuf, "%" PRIuS "x%" PRIuS, width, height);
}
}
show_strbuf(pname, 0);
return had_error;
}


int device_info_img_sz_3d(cl_device_id dev, cl_device_info param, const char *pname,
const struct device_info_checks *chk UNUSED)
{
Expand Down Expand Up @@ -1766,6 +1789,9 @@ struct device_info_traits dinfo_traits[] = {
{ CLINFO_HUMAN, DINFO_SFX(CL_DEVICE_IMAGE2D_MAX_HEIGHT, INDENT "Max 2D image size", pixels_str, img_sz_2d), dev_has_images },
{ CLINFO_RAW, DINFO(CL_DEVICE_IMAGE2D_MAX_HEIGHT, INDENT "Max 2D image height", sz), dev_has_images },
{ CLINFO_RAW, DINFO(CL_DEVICE_IMAGE2D_MAX_WIDTH, INDENT "Max 2D image width", sz), dev_has_images },
{ CLINFO_HUMAN, DINFO_SFX(CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL, INDENT "Max planar YUV image size", pixels_str, img_sz_2d), dev_has_intel_planar_yuv },
{ CLINFO_RAW, DINFO(CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL, INDENT "Max planar YUV image height", sz), dev_has_intel_planar_yuv },
{ CLINFO_RAW, DINFO(CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL, INDENT "Max planar YUV image width", sz), dev_has_intel_planar_yuv },
{ CLINFO_HUMAN, DINFO_SFX(CL_DEVICE_IMAGE3D_MAX_HEIGHT, INDENT "Max 3D image size", pixels_str, img_sz_3d), dev_has_images },
{ CLINFO_RAW, DINFO(CL_DEVICE_IMAGE3D_MAX_HEIGHT, INDENT "Max 3D image height", sz), dev_has_images },
{ CLINFO_RAW, DINFO(CL_DEVICE_IMAGE3D_MAX_WIDTH, INDENT "Max 3D image width", sz), dev_has_images },
Expand Down
4 changes: 4 additions & 0 deletions src/ext.h
Expand Up @@ -153,6 +153,10 @@ typedef cl_ulong cl_device_partition_property_ext;
#define CL_DEVICE_AVC_ME_SUPPORTS_TEXTURE_SAMPLER_USE_INTEL 0x410C
#define CL_DEVICE_AVC_ME_SUPPORTS_PREEMPTION_INTEL 0x410D

/* cl_intel_planar_yuv */
#define CL_DEVICE_PLANAR_YUV_MAX_WIDTH_INTEL 0x417E
#define CL_DEVICE_PLANAR_YUV_MAX_HEIGHT_INTEL 0x417F

/* cl_qcom_ext_host_ptr */
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
Expand Down

0 comments on commit 2bd2c79

Please sign in to comment.