mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-22 23:29:02 +00:00
* Fix Issue #35 - ask for capability size. Too small size could cause errors * Fix Issue #35 - Review fixes * Fix Issue #35 - Review fixes - build issues fixed
This commit is contained in:
committed by
Kévin Petit
parent
bfb3e4aa2c
commit
fa312ab953
@@ -703,18 +703,22 @@ test_status InitCL( cl_device_id device )
|
||||
gIsRTZ = 1;
|
||||
}
|
||||
|
||||
char extensions[2048] = "";
|
||||
if( (error = clGetDeviceInfo( device, CL_DEVICE_EXTENSIONS, sizeof( extensions ), extensions, NULL ) ) )
|
||||
{
|
||||
vlog_error( "FAILURE: unable to get device info for CL_DEVICE_EXTENSIONS!" );
|
||||
return TEST_FAIL;
|
||||
}
|
||||
else if( strstr( extensions, "cl_khr_fp64" ) )
|
||||
else if(is_extension_available(device, "cl_khr_fp64"))
|
||||
{
|
||||
gHasDouble = 1;
|
||||
}
|
||||
gTestDouble &= gHasDouble;
|
||||
|
||||
//detect whether profile of the device is embedded
|
||||
char profile[1024] = "";
|
||||
if( (error = clGetDeviceInfo( device, CL_DEVICE_PROFILE, sizeof(profile), profile, NULL ) ) ){}
|
||||
else if( strstr(profile, "EMBEDDED_PROFILE" ) )
|
||||
{
|
||||
gIsEmbedded = 1;
|
||||
if( !is_extension_available(device, "cles_khr_int64" ) )
|
||||
gHasLong = 0;
|
||||
}
|
||||
|
||||
|
||||
gContext = clCreateContext( NULL, 1, &device, notify_callback, NULL, &error );
|
||||
if( NULL == gContext || error )
|
||||
|
||||
Reference in New Issue
Block a user