diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-12 14:29:23 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2014-09-12 16:08:41 +0800 |
commit | 44a2c4f5455980221a179c95fb7f8a4c024bcb94 (patch) | |
tree | bb0acfa38294ceef551adf7519c5461a3ff3a68f /src/cl_api.c | |
parent | 30e684ed12ac82c900cf985d7e5d0a4355035282 (diff) | |
download | beignet-44a2c4f5455980221a179c95fb7f8a4c024bcb94.tar.gz |
runtime: fix build status handling.
According to the spec:
The build status is to
Returns the build, compile or link status,
whichever was performed last on program for
device.
The previous implementation only consider the clProgramBuild and
doesn't consider the compile. Now fix it.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
Tested-by: "Meng, Mengmeng" <mengmeng.meng@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
Diffstat (limited to 'src/cl_api.c')
-rw-r--r-- | src/cl_api.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/cl_api.c b/src/cl_api.c index a8a4b741..50f258a0 100644 --- a/src/cl_api.c +++ b/src/cl_api.c @@ -1140,17 +1140,7 @@ clGetProgramBuildInfo(cl_program program, INVALID_DEVICE_IF (device != program->ctx->device); if (param_name == CL_PROGRAM_BUILD_STATUS) { - cl_build_status status; - - if (!program->is_built) - status = CL_BUILD_NONE; - else if (program->ker_n > 0) - status = CL_BUILD_SUCCESS; - else - status = CL_BUILD_ERROR; - // TODO: Support CL_BUILD_IN_PROGRESS ? - - FILL_GETINFO_RET (cl_build_status, 1, &status, CL_SUCCESS); + FILL_GETINFO_RET (cl_build_status, 1, &program->build_status, CL_SUCCESS); } else if (param_name == CL_PROGRAM_BUILD_OPTIONS) { if (program->is_built && program->build_opts) ret_str = program->build_opts; |