[Beignet] [PATCH 1/2] rumtime: check all the extension id, not only BASE and OPT1.

Chuanbo Weng chuanbo.weng at intel.com
Thu Oct 13 09:06:05 UTC 2016


Signed-off-by: Chuanbo Weng <chuanbo.weng at intel.com>
---
 src/cl_extensions.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/src/cl_extensions.c b/src/cl_extensions.c
index 4693bb6..93277f6 100644
--- a/src/cl_extensions.c
+++ b/src/cl_extensions.c
@@ -117,16 +117,7 @@ cl_intel_platform_enable_extension(cl_device_id device, uint32_t ext)
   cl_platform_id pf = device->platform;
   assert(pf);
 
-  for(id = OPT1_EXT_START_ID; id <= OPT1_EXT_END_ID; id++) {
-    if (id == ext) {
-      if (!pf->internal_extensions->extensions[id].base.ext_enabled)
-        ext_str = pf->internal_extensions->extensions[id].base.ext_name;
-
-      break;
-    }
-  }
-
-  for(id = BASE_EXT_START_ID; id <= BASE_EXT_END_ID; id++) {
+  for(id = BASE_EXT_START_ID; id < cl_khr_extension_id_max; id++) {
     if (id == ext) {
       if (!pf->internal_extensions->extensions[id].base.ext_enabled)
         ext_str = pf->internal_extensions->extensions[id].base.ext_name;
-- 
1.9.1



More information about the Beignet mailing list