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

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

Details

Message ID 1476349565-30785-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.
Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com>
---
 src/cl_extensions.c | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

Patch hide | download patch | download mbox

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;