When you use an invalid option to build a program, you get the CL_INVALID_BUILD_OPTIONS error, but somehow it also makes the device used for the build invalid. So if you after that asks for the build log with clGetProgramBuildInfo you get also a CL_INVALID_DEVICE. Way to reproduce this bug: 1- Clone tstellard's repo of opencl-examples: http://cgit.freedesktop.org/~tstellar/opencl-example/ 2- Modify hello-world.c at line 112 to some invalid options. 3- Compile and run it, it fails at the clGetPrograBuildInfo some lines below. Expected output: Maybe an empty log and a CL_INVALID_BUILD_OPTIONS error. This bug may make difficult to track problems because one may think that the device is wrong, when all that has happened is that he have used wrong build options.
Created attachment 88156 [details] [review] clover_get_program_build_info_error_check.patch The attached patch should help. Thanks.
Hi, The patch you submitted fixes it. Thanks!
This should be fixed in master now [1]. Thanks. [1] http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8f89fc5cbd41a45130630080ffc921c60604545
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.