mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Ensure is_extension_available is used where possible (#722)
(Patch2) A number of tests have got their own code for checking the presence of extensions. This change replaces that code with is_extension_available function. Contributes to #627 Signed-off-by: Ellen Norris-Thompson <ellen.norris-thompson@arm.com> Change-Id: I17e007e5ad009e522c5006c42537bf1170550a6f
This commit is contained in:
@@ -366,35 +366,7 @@ static bool isLongSupported(cl_device_id device_id)
|
||||
|
||||
if(!strcmp("EMBEDDED_PROFILE",profileType.get()))
|
||||
{
|
||||
// Device extention
|
||||
status = clGetDeviceInfo(
|
||||
device_id,
|
||||
CL_DEVICE_EXTENSIONS,
|
||||
0,
|
||||
NULL,
|
||||
&tempSize);
|
||||
|
||||
if(status != CL_SUCCESS)
|
||||
{
|
||||
log_error("*** clGetDeviceInfo FAILED ***\n\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
std::unique_ptr<char[]> devExt(new char[tempSize]);
|
||||
if(devExt == NULL)
|
||||
{
|
||||
log_error("Failed to allocate memory(devExt)");
|
||||
return false;
|
||||
}
|
||||
|
||||
status = clGetDeviceInfo(
|
||||
device_id,
|
||||
CL_DEVICE_EXTENSIONS,
|
||||
sizeof(char) * tempSize,
|
||||
devExt.get(),
|
||||
NULL);
|
||||
|
||||
extSupport = (strstr(devExt.get(),"cles_khr_int64") != NULL);
|
||||
extSupport = is_extension_available(device_id, "cles_khr_int64");
|
||||
}
|
||||
return extSupport;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user