[2/2] runtime: set cl_intel_motion_estimation as IVB specifc device extension.

Submitted by Chuanbo Weng on Oct. 13, 2016, 9:06 a.m.

Details

Message ID 1476349573-30824-1-git-send-email-chuanbo.weng@intel.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Beignet

Not browsing as part of any series.

Commit Message

Chuanbo Weng Oct. 13, 2016, 9:06 a.m.
Currently, cl_intel_motion_estimation is just implemented on IVB.

Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
---
 src/cl_device_id.c  | 3 +++
 src/cl_extensions.c | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/cl_device_id.c b/src/cl_device_id.c
index 4ea1828..7d56d90 100644
--- a/src/cl_device_id.c
+++ b/src/cl_device_id.c
@@ -423,6 +423,7 @@  ivb_gt1_break:
       intel_ivb_gt1_device.platform = cl_get_platform_default();
       ret = &intel_ivb_gt1_device;
       cl_intel_platform_get_default_extension(ret);
+      cl_intel_platform_enable_extension(ret, cl_intel_motion_estimation_ext_id);
       break;
 
     case PCI_CHIP_IVYBRIDGE_GT2:
@@ -436,6 +437,7 @@  ivb_gt2_break:
       intel_ivb_gt2_device.platform = cl_get_platform_default();
       ret = &intel_ivb_gt2_device;
       cl_intel_platform_get_default_extension(ret);
+      cl_intel_platform_enable_extension(ret, cl_intel_motion_estimation_ext_id);
       break;
 
     case PCI_CHIP_BAYTRAIL_T:
@@ -445,6 +447,7 @@  baytrail_t_device_break:
       intel_baytrail_t_device.platform = cl_get_platform_default();
       ret = &intel_baytrail_t_device;
       cl_intel_platform_get_default_extension(ret);
+      cl_intel_platform_enable_extension(ret, cl_intel_motion_estimation_ext_id);
       break;
 
     case PCI_CHIP_BROADWLL_M_GT1:
diff --git a/src/cl_extensions.c b/src/cl_extensions.c
index 93277f6..14bdef4 100644
--- a/src/cl_extensions.c
+++ b/src/cl_extensions.c
@@ -69,7 +69,8 @@  check_intel_extension(cl_extensions_t *extensions)
 {
   int id;
   for(id = INTEL_EXT_START_ID; id <= INTEL_EXT_END_ID; id++)
-    extensions->extensions[id].base.ext_enabled = 1;
+    if(id != EXT_ID(intel_motion_estimation))
+      extensions->extensions[id].base.ext_enabled = 1;
 }
 
 void