mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 22:19:02 +00:00
Synchronise with Khronos-private Gitlab branch
The maintenance of the conformance tests is moving to Github. This commit contains all the changes that have been done in Gitlab since the first public release of the conformance tests. Signed-off-by: Kevin Petit <kevin.petit@arm.com>
This commit is contained in:
@@ -71,6 +71,13 @@ int kernel_functions(cl_device_id deviceID, cl_context context, cl_command_queue
|
||||
|
||||
while (deviceWrapper->AdapterNext())
|
||||
{
|
||||
cl_int error;
|
||||
//check if the test can be run on the adapter
|
||||
if (CL_SUCCESS != (error = deviceExistForCLTest(gPlatformIDdetected, adapterType, deviceWrapper->Device(), result, sharedHandle)))
|
||||
{
|
||||
return result.Result();
|
||||
}
|
||||
|
||||
if (surfaceFormat != SURFACE_FORMAT_NV12 && !SurfaceFormatCheck(adapterType, *deviceWrapper, surfaceFormat))
|
||||
{
|
||||
std::string sharedHandleStr = (sharedHandle == SHARED_HANDLE_ENABLED)? "yes": "no";
|
||||
@@ -109,7 +116,6 @@ int kernel_functions(cl_device_id deviceID, cl_context context, cl_command_queue
|
||||
0,
|
||||
};
|
||||
|
||||
cl_int error;
|
||||
clContextWrapper ctx = clCreateContext(&contextProperties[0], 1, &gDeviceIDdetected, NULL, NULL, &error);
|
||||
if (error != CL_SUCCESS)
|
||||
{
|
||||
@@ -335,13 +341,20 @@ int kernel_functions(cl_device_id deviceID, cl_context context, cl_command_queue
|
||||
}
|
||||
}
|
||||
|
||||
if (!deviceWrapper->Status())
|
||||
if (deviceWrapper->Status() != DEVICE_PASS)
|
||||
{
|
||||
std::string adapter;
|
||||
AdapterToString(adapterType, adapter);
|
||||
log_error("%s init failed\n", adapter.c_str());
|
||||
std::string adapterName;
|
||||
AdapterToString(adapterType, adapterName);
|
||||
if (deviceWrapper->Status() == DEVICE_FAIL)
|
||||
{
|
||||
log_error("%s init failed\n", adapterName.c_str());
|
||||
result.ResultSub(CResult::TEST_FAIL);
|
||||
return result.Result();
|
||||
}
|
||||
else
|
||||
{
|
||||
log_error("%s init incomplete due to unsupported device\n", adapterName.c_str());
|
||||
result.ResultSub(CResult::TEST_NOTSUPPORTED);
|
||||
}
|
||||
}
|
||||
|
||||
return result.Result();
|
||||
|
||||
Reference in New Issue
Block a user