mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-13 10:14:36 +08:00
Include files are now grouped and sorted in following order: 1. Header file of the class the current file implements 2. Project files 3. Third party files 4. Standard library Change-Id: If31af05652184169f7fee1d7ad08f1b2ed602cf0 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
51 lines
1.5 KiB
C++
51 lines
1.5 KiB
C++
/*
|
|
* Copyright (C) 2018-2019 Intel Corporation
|
|
*
|
|
* SPDX-License-Identifier: MIT
|
|
*
|
|
*/
|
|
|
|
#include "unit_tests/mocks/gl/mock_gl_sharing.h"
|
|
|
|
#include "config.h"
|
|
|
|
namespace OCLRT {
|
|
int EGLCreateContextCalled = 0;
|
|
int EGLChooseConfigCalled = 0;
|
|
int EGLDeleteContextCalled = 0;
|
|
int GlxChooseFBConfigCalled = 0;
|
|
int GlxQueryContextCalled = 0;
|
|
int GlxCreateNewContextCalled = 0;
|
|
int GlxDeleteContextCalled = 0;
|
|
int GlxIsDirectCalled = 0;
|
|
EGLBkpContextParams eglBkpContextParams = {0};
|
|
GLXBkpContextParams glxBkpContextParams = {0};
|
|
|
|
void GlSharingFunctionsMock::initMembers() {
|
|
GLSharingFunctions::initGLFunctions();
|
|
glDllHelper dllParam;
|
|
dllParam.setGLSetSharedOCLContextStateReturnedValue(1u);
|
|
dllParam.resetParam("");
|
|
dllParam.loadTexture({0});
|
|
dllParam.loadBuffer({0});
|
|
EGLChooseConfigCalled = 0;
|
|
EGLCreateContextCalled = 0;
|
|
EGLDeleteContextCalled = 0;
|
|
GlxChooseFBConfigCalled = 0;
|
|
GlxQueryContextCalled = 0;
|
|
GlxCreateNewContextCalled = 0;
|
|
GlxDeleteContextCalled = 0;
|
|
GlxIsDirectCalled = 0;
|
|
memset(&eglBkpContextParams, 0, sizeof(EGLBkpContextParams));
|
|
memset(&glxBkpContextParams, 0, sizeof(GLXBkpContextParams));
|
|
}
|
|
|
|
GlSharingFunctionsMock::GlSharingFunctionsMock() {
|
|
initMembers();
|
|
}
|
|
|
|
MockGlSharing::MockGlSharing(GLType glhdcType, GLContext glhglrcHandle, GLContext glhglrcHandleBkpCtx, GLDisplay glhdcHandle) {
|
|
sharingFunctions->setHandles(glhdcType, glhglrcHandle, glhglrcHandleBkpCtx, glhdcHandle);
|
|
}
|
|
} // namespace OCLRT
|