[clinfo] 11/55: Support cl_intel_planar_yuv

Andreas Beckmann anbe at moszumanska.debian.org
Sat Jan 13 14:39:59 UTC 2018


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository clinfo.

commit 2bd2c7982aaf121d19a6fa251ce67af697a16094
Author: Giuseppe Bilotta <giuseppe.bilotta at gmail.com>
Date:   Fri Jan 20 20:44:15 2017 +0100

    Support cl_intel_planar_yuv
---
 man/clinfo.1 |  3 +++
 src/clinfo.c | 26 ++++++++++++++++++++++++++
 src/ext.h    |  4 ++++
 3 files changed, 33 insertions(+)

diff --git a/man/clinfo.1 b/man/clinfo.1
index dc4a0f2..b4bc35e 100644
--- a/man/clinfo.1
+++ b/man/clinfo.1
@@ -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
diff --git a/src/clinfo.c b/src/clinfo.c
index b588c00..529d665 100644
--- a/src/clinfo.c
+++ b/src/clinfo.c
@@ -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];
@@ -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)
@@ -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);
@@ -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)
 {
@@ -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 },
diff --git a/src/ext.h b/src/ext.h
index c8970ef..ce48b4c 100644
--- a/src/ext.h
+++ b/src/ext.h
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/clinfo.git



More information about the Pkg-opencl-commits mailing list