fix utest bug.

Submitted by Luo, Xionghu on July 13, 2015, 6:51 p.m.

Details

Message ID 1436813494-23237-1-git-send-email-xionghu.luo@intel.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Luo, Xionghu July 13, 2015, 6:51 p.m.
From: Luo Xionghu <xionghu.luo@intel.com>

should query and use extension info by same API clGetPlatformInfo.

Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>
---
 utests/load_program_from_spir.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/utests/load_program_from_spir.cpp b/utests/load_program_from_spir.cpp
index f03e7c2..8ea1cd4 100644
--- a/utests/load_program_from_spir.cpp
+++ b/utests/load_program_from_spir.cpp
@@ -16,7 +16,7 @@  static void test_load_program_from_spir(void)
     std::string extensionStr;
     OCL_CALL (clGetPlatformInfo, platform, CL_PLATFORM_EXTENSIONS, 0, 0, &param_value_size);
     std::vector<char> param_value(param_value_size);
-    OCL_CALL (clGetDeviceInfo, device, CL_DEVICE_EXTENSIONS, param_value_size, param_value.empty() ? NULL : &param_value.front(), &param_value_size);
+    OCL_CALL (clGetPlatformInfo, platform, CL_PLATFORM_EXTENSIONS, param_value_size, param_value.empty() ? NULL : &param_value.front(), &param_value_size);
     if (!param_value.empty())
       extensionStr = std::string(&param_value.front(), param_value_size-1);
 

Comments

LGTM, will push it later, thanks.

> -----Original Message-----

> From: Beignet [mailto:beignet-bounces@lists.freedesktop.org] On Behalf Of

> xionghu.luo@intel.com

> Sent: Tuesday, July 14, 2015 02:52

> To: beignet@lists.freedesktop.org

> Cc: Luo, Xionghu

> Subject: [Beignet] [PATCH] fix utest bug.

> 

> From: Luo Xionghu <xionghu.luo@intel.com>

> 

> should query and use extension info by same API clGetPlatformInfo.

> 

> Signed-off-by: Luo Xionghu <xionghu.luo@intel.com>

> ---

>  utests/load_program_from_spir.cpp | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

> 

> diff --git a/utests/load_program_from_spir.cpp

> b/utests/load_program_from_spir.cpp

> index f03e7c2..8ea1cd4 100644

> --- a/utests/load_program_from_spir.cpp

> +++ b/utests/load_program_from_spir.cpp

> @@ -16,7 +16,7 @@ static void test_load_program_from_spir(void)

>      std::string extensionStr;

>      OCL_CALL (clGetPlatformInfo, platform, CL_PLATFORM_EXTENSIONS, 0, 0,

> &param_value_size);

>      std::vector<char> param_value(param_value_size);

> -    OCL_CALL (clGetDeviceInfo, device, CL_DEVICE_EXTENSIONS,

> param_value_size, param_value.empty() ? NULL : &param_value.front(),

> &param_value_size);

> +    OCL_CALL (clGetPlatformInfo, platform, CL_PLATFORM_EXTENSIONS,

> param_value_size, param_value.empty() ? NULL : &param_value.front(),

> &param_value_size);

>      if (!param_value.empty())

>        extensionStr = std::string(&param_value.front(), param_value_size-1);

> 

> --

> 1.9.1

> 

> _______________________________________________

> Beignet mailing list

> Beignet@lists.freedesktop.org

> http://lists.freedesktop.org/mailman/listinfo/beignet