SWDEV-493913 - Replaced calls to clGetExtensionFunctionAddress in ocltst
Replaced clGetExtensionFunctionAddress calls with clGetExtensionFunctionAddressForPlatform to ensure interoperability with distribution ICD loaders. Change-Id: I560a62459f2ad222750e65e869b98d6b6ec56665
Этот коммит содержится в:
поставляемый
+2
-2
@@ -109,7 +109,6 @@ class App {
|
||||
m_window(0),
|
||||
m_platform(platform) {
|
||||
// initialize OCLWrapper reference
|
||||
m_wrapper = new OCLWrapper();
|
||||
|
||||
// m_workers = Set of worker objects that are used to run a subtest from a
|
||||
// module
|
||||
@@ -120,7 +119,8 @@ class App {
|
||||
* Force caltst to use 1 thread at a time in Windows
|
||||
* only contextual calls are thread safe currently
|
||||
*/
|
||||
m_numDevices = findAdapters(m_platform, m_useCPU, NULL);
|
||||
m_numDevices = findAdapters(m_platform, m_useCPU, &mpform_id);
|
||||
m_wrapper = new OCLWrapper(mpform_id);
|
||||
// m_numDevices = 1;
|
||||
|
||||
// Report structure used to store the results of the tests
|
||||
|
||||
@@ -103,7 +103,7 @@ typedef CL_API_ENTRY cl_int(CL_API_CALL *clSetDeviceClockModeAMD_fn)(
|
||||
|
||||
class OCLWrapper {
|
||||
public:
|
||||
OCLWrapper();
|
||||
OCLWrapper(cl_platform_id);
|
||||
|
||||
~OCLWrapper() {}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "OCLWrapper.h"
|
||||
|
||||
OCLWrapper::OCLWrapper() {
|
||||
OCLWrapper::OCLWrapper(cl_platform_id platform) {
|
||||
clEnqueueWaitSignalAMD_ptr =
|
||||
(clEnqueueWaitSignalAMD_fn)clGetExtensionFunctionAddress(
|
||||
"clEnqueueWaitSignalAMD");
|
||||
@@ -40,27 +40,29 @@ OCLWrapper::OCLWrapper() {
|
||||
(clGetGLContextInfoKHR_fn)clGetExtensionFunctionAddress(
|
||||
"clGetGLContextInfoKHR");
|
||||
clCreateFromGLBuffer_ptr =
|
||||
(clCreateFromGLBuffer_fn)clGetExtensionFunctionAddress(
|
||||
"clCreateFromGLBuffer");
|
||||
(clCreateFromGLBuffer_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clCreateFromGLBuffer");
|
||||
clCreateFromGLTexture_ptr =
|
||||
(clCreateFromGLTexture_fn)clGetExtensionFunctionAddress(
|
||||
"clCreateFromGLTexture");
|
||||
(clCreateFromGLTexture_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clCreateFromGLTexture");
|
||||
clCreateFromGLTexture2D_ptr =
|
||||
(clCreateFromGLTexture2D_fn)clGetExtensionFunctionAddress(
|
||||
"clCreateFromGLTexture2D");
|
||||
(clCreateFromGLTexture2D_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clCreateFromGLTexture2D");
|
||||
clCreateFromGLRenderbuffer_ptr =
|
||||
(clCreateFromGLRenderbuffer_fn)clGetExtensionFunctionAddress(
|
||||
"clCreateFromGLRenderbuffer");
|
||||
(clCreateFromGLRenderbuffer_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clCreateFromGLRenderbuffer");
|
||||
clGetGLObjectInfo_ptr =
|
||||
(clGetGLObjectInfo_fn)clGetExtensionFunctionAddress("clGetGLObjectInfo");
|
||||
clGetGLTextureInfo_ptr = (clGetGLTextureInfo_fn)clGetExtensionFunctionAddress(
|
||||
"clGetGLTextureInfo");
|
||||
(clGetGLObjectInfo_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clGetGLObjectInfo");
|
||||
clGetGLTextureInfo_ptr =
|
||||
(clGetGLTextureInfo_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clGetGLTextureInfo");
|
||||
clEnqueueAcquireGLObjects_ptr =
|
||||
(clEnqueueAcquireGLObjects_fn)clGetExtensionFunctionAddress(
|
||||
"clEnqueueAcquireGLObjects");
|
||||
(clEnqueueAcquireGLObjects_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clEnqueueAcquireGLObjects");
|
||||
clEnqueueReleaseGLObjects_ptr =
|
||||
(clEnqueueReleaseGLObjects_fn)clGetExtensionFunctionAddress(
|
||||
"clEnqueueReleaseGLObjects");
|
||||
(clEnqueueReleaseGLObjects_fn)clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clEnqueueReleaseGLObjects");
|
||||
|
||||
// Performance counter function pointers
|
||||
clCreatePerfCounterAMD_ptr =
|
||||
|
||||
Ссылка в новой задаче
Block a user