Cycles: Strip meaningless empty output form the MVidia OpenCL compiler
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 1 Jun 2015 14:36:13 +0000 (19:36 +0500)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 1 Jun 2015 14:49:53 +0000 (19:49 +0500)
intern/cycles/device/device_opencl.cpp

index 4a9180212504a6a1117e0d949319ad1514544b6f..87d4ee919194366033f71b218c68ef92ee674173 100644 (file)
@@ -640,8 +640,11 @@ public:
                        clGetProgramBuildInfo(*kernel_program, cdDevice, CL_PROGRAM_BUILD_LOG, ret_val_size, &build_log[0], NULL);
 
                        build_log[ret_val_size] = '\0';
-                       fprintf(stderr, "OpenCL kernel build output:\n");
-                       fprintf(stderr, "%s\n", &build_log[0]);
+                       /* Skip meaningless empty output from the NVidia compiler. */
+                       if(!(ret_val_size == 2 && build_log[0] == '\n')) {
+                               fprintf(stderr, "OpenCL kernel build output:\n");
+                               fprintf(stderr, "%s\n", &build_log[0]);
+                       }
                }
 
                if(ciErr != CL_SUCCESS) {