Browse Source

Partially reverting e4a4efdb42 to keep MSVS compatibility.

djm34
troky 11 years ago
parent
commit
68c54c226c
  1. 6
      ocl.c

6
ocl.c

@ -619,9 +619,10 @@ build:
size_t log_size; size_t log_size;
status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
char sz_log[log_size]; char *sz_log = (char *)malloc(log_size);
status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, log_size, sz_log, NULL); status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, log_size, sz_log, NULL);
applog(LOG_ERR, "%s", sz_log); applog(LOG_ERR, "%s", sz_log);
free(sz_log);
goto not_built; goto not_built;
} }
@ -755,9 +756,10 @@ built:
size_t log_size; size_t log_size;
status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size); status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, 0, NULL, &log_size);
char sz_log[log_size]; char *sz_log = (char *)malloc(log_size);
status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, log_size, sz_log, NULL); status = clGetProgramBuildInfo(clState->program, devices[gpu], CL_PROGRAM_BUILD_LOG, log_size, sz_log, NULL);
applog(LOG_ERR, "%s", sz_log); applog(LOG_ERR, "%s", sz_log);
free(sz_log);
return NULL; return NULL;
} }
} }

Loading…
Cancel
Save