Proposed patch for bug 14270

This commit is contained in:
Brian Sumner
2017-05-26 13:48:40 -07:00
committed by Kévin Petit
parent b99c6004ce
commit ce74e803b9
11 changed files with 255 additions and 86 deletions

View File

@@ -40,6 +40,13 @@ int interop_user_sync(cl_device_id deviceID, cl_context context, cl_command_queu
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))
{
@@ -71,7 +78,7 @@ int interop_user_sync(cl_device_id deviceID, cl_context context, cl_command_queu
0,
};
cl_int error;
clContextWrapper ctx;
switch(functionCreate)
{
@@ -258,13 +265,21 @@ int interop_user_sync(cl_device_id deviceID, cl_context context, cl_command_queu
}
}
if (!deviceWrapper->Status())
if (deviceWrapper->Status() != DEVICE_PASS)
{
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();