From: Rodeo Date: Wed, 22 May 2013 17:31:31 +0000 (+0000) Subject: OpenCL: disable binary generation under OS X. it offers little advantage, and is... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=32266ab3a804f29a3979b2c1880969d2b4d24e4a;p=handbrake OpenCL: disable binary generation under OS X. it offers little advantage, and is known not to work. This may be removed altogether eventually. git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/opencl@5496 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- diff --git a/libhb/openclwrapper.c b/libhb/openclwrapper.c index 9254501d9..10849fd45 100644 --- a/libhb/openclwrapper.c +++ b/libhb/openclwrapper.c @@ -811,8 +811,12 @@ int hb_compile_kernel_file( const char *filename, GPUEnv *gpu_info, source = source_str; source_size[0] = strlen( source ); +#ifdef __APPLE__ binaryExisted = 0; - if((binaryExisted = hb_binary_generated( gpu_info->context, filename, &fd )) == 1 ) +#else + binaryExisted = hb_binary_generated(gpu_info->context, filename, &fd); +#endif + if (binaryExisted == 1) { status = clGetContextInfo( gpu_info->context, CL_CONTEXT_NUM_DEVICES, @@ -940,10 +944,12 @@ int hb_compile_kernel_file( const char *filename, GPUEnv *gpu_info, strcpy( gpu_env.kernelSrcFile[idx], filename ); - if( binaryExisted == 0 ) - { - hb_generat_bin_from_kernel_source( gpu_env.programs[idx], filename ); - } +#ifndef __APPLE__ + if (!binaryExisted) + { + hb_generat_bin_from_kernel_source(gpu_env.programs[idx], filename); + } +#endif gpu_info->file_count += 1;