Skip to content
This repository was archived by the owner on Apr 3, 2020. It is now read-only.

Commit 275da94

Browse files
author
Raphael Kubo da Costa
committed
WebCL: Fix the build on Android 64-bits.
clGetKernelInfo() expects size_t parameters instead of cl_uint ones for |param_value_size_ret|. Since cl_uint is a typedef for uint32_t regardless of whether we're building for 32 or 64 bits, the build was failing like this: ../../third_party/WebKit/Source/modules/webcl/WebCLProgram.cpp: In member function 'WTF::Vector<WTF::RefPtr<blink::WebCLKernel> > blink::WebCLProgram::createKernelsInProgram(blink::ExceptionState&)': ../../third_party/WebKit/Source/modules/webcl/WebCLProgram.cpp:262:100: error: cannot convert 'cl_uint* {aka unsigned int*}' to 'size_t* {aka long unsigned int*}' in argument passing err = clGetKernelInfo(kernelBuf[i], CL_KERNEL_FUNCTION_NAME, 0, nullptr, &bytesOfKernelName); ^ BUG=XWALK-3608
1 parent 8ed65f9 commit 275da94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Source/modules/webcl/WebCLProgram.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ Vector<RefPtr<WebCLKernel>> WebCLProgram::createKernelsInProgram(ExceptionState&
256256
}
257257

258258
Vector<char> kernelName;
259-
cl_uint bytesOfKernelName = 0;
259+
size_t bytesOfKernelName = 0;
260260
Vector<RefPtr<WebCLKernel>> m_kernelList;
261261
for (size_t i = 0 ; i < num; i++) {
262262
err = clGetKernelInfo(kernelBuf[i], CL_KERNEL_FUNCTION_NAME, 0, nullptr, &bytesOfKernelName);

0 commit comments

Comments
 (0)