Page 1 of 1

[SOLVED] OpenCL GpuSoftBodySolvers (non-SIMD-aware) issue

Posted: Fri Sep 16, 2011 8:58 pm
by gjunker
When I try to disable the USE_SIMDAWARE_SOLVER flag in the OpenCLClothDemo code, I run into a problem with compiling shadesr, First, it appears that the non-SIMD-aware solvers do not actually call buildShaders() like the SIMD version does. Second, when I add a call in the non-SIMD-aware solver to call buildShaders() (in the same place as the SIMD-aware one does, at the end of optimize()), the shaders fail to build.

Is the OpenCL support in the soft-body solvers restricted only to "SIMD-aware" now? IOW, it looks like the non-SIMD-aware code paths no longer are tested -- is this the case?

Thanks
Greg

Re: OpenCL GpuSoftBodySolvers (non-SIMD-aware) issue

Posted: Fri Sep 16, 2011 9:30 pm
by gjunker
NM I think I found it -- I was wondering about this when I was looking through the non-SIMD-aware code and coulnd't find some of these kernel names. I added some additional error message generation code to CLFunctions::compileCLKernelFromString in btSoftBodySovler_OpenCL.cpp, and see

Code: Select all

compiling kernelName: m_prepareLinksKernel Error in clCreateKernel for kernel 'm_prepareLinksKernel', error is "kernel_name is not found in program.", Line 1529 in file /usr/pic1/gjunker/projects/bullet/src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/btSoftBodySolver_OpenCL.cpp !!!
Fixing the kernel names in the calls to this method solves the problem. I'll do up a patch for it.

Re: [SOLVED] OpenCL GpuSoftBodySolvers (non-SIMD-aware) issu

Posted: Fri Sep 16, 2011 9:42 pm
by Erwin Coumans
Are you using Bullet 2.78 or a svn trunk version? I think this already was fixed in the latest trunk, but I'll double check and fix it.

Thanks for the report!
Erwin

Re: [SOLVED] OpenCL GpuSoftBodySolvers (non-SIMD-aware) issu

Posted: Fri Sep 16, 2011 9:45 pm
by gjunker
Latest (as of about 5 min ago) trunk. I didn't see a fix unless you had fixed it in ahother file? I was only looking in btSoftBodySolver_OpenCL.cpp.

About to send up the patch now.

[edit: http://code.google.com/p/bullet/issues/detail?id=546]

Thanks!
Greg

Re: [SOLVED] OpenCL GpuSoftBodySolvers (non-SIMD-aware) issu

Posted: Fri Sep 16, 2011 9:58 pm
by Erwin Coumans
It is already fixed in trunk :)

Thanks for the report!
Erwin

Re: [SOLVED] OpenCL GpuSoftBodySolvers (non-SIMD-aware) issu

Posted: Fri Sep 16, 2011 9:59 pm
by Erwin Coumans
Ah, I missed your patch so I didn't apply the other changes.

Thanks,
Erwin

Re: [SOLVED] OpenCL GpuSoftBodySolvers (non-SIMD-aware) issu

Posted: Fri Sep 16, 2011 10:01 pm
by gjunker
Not a problem, sometimes fixes cross each other in the SCM. ;)