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

Change-Id: Ia3dbc661b3b9b1de71a632969707318f208131cd
This commit is contained in:
Xie, AlexBin authored and GitHub committed 2025-06-27 12:25:23 -04:00
1 parent 592c25e936
commit ef26fcdbd2
3 files changed
+19 -2

No files matched your search

@@ -24,7 +24,7 @@
#include <cstring>
void OCLGLCommon::open(unsigned int test, char *units, double &conversion,
unsigned int deviceId) {
unsigned int &deviceId) {
// OpenCL Initialization
OCLTestImp::open(test, units, conversion, deviceId);
CHECK_RESULT((error_ != CL_SUCCESS), "Error opening test (%d)", error_);
@@ -51,6 +51,8 @@ void OCLGLCommon::open(unsigned int test, char *units, double &conversion,
CHECK_RESULT((retVal == CL_SUCCESS), "Error opening test (%d)", error_);
createCLContextFromGLContext(hGL_);
// Device id may change to match the GL context. Return the id to caller
deviceId = _deviceId;
}
bool OCLGLCommon::IsGLEnabled(unsigned int test, char *units,