SWDEV-530767 ocltst GL test work with GL context on 2nd GPU (#324)

Change-Id: Ia3dbc661b3b9b1de71a632969707318f208131cd
Tento commit je obsažen v:
Xie, AlexBin
2025-06-27 12:25:23 -04:00
odevzdal GitHub
rodič 592c25e936
revize ef26fcdbd2
3 změnil soubory, kde provedl 19 přidání a 2 odebrání
+15
Zobrazit soubor
@@ -169,6 +169,21 @@ bool OCLGLCommon::checkAssociationDeviceWithGLContext(OCLGLHandle& hGL) {
}
}
// If the current device id does not work for CL GL interop,
// fall back to other devices.
if (!ret) {
for (unsigned int i = 0; i < numDevices; i++) {
for (unsigned int j = 0; j < deviceCount_; j++) {
if (interopDevices[i] == devices_[j]) {
// Found an OpenCL device work with current GL context.
_deviceId = j;
ret = true;
break;
}
}
}
}
free(interopDevices);
return ret;
}