summaryrefslogtreecommitdiff
path: root/src/cl_api.c
diff options
context:
space:
mode:
authorLuo Xionghu <xionghu.luo@intel.com>2015-11-26 14:00:00 +0800
committerYang Rong <rong.r.yang@intel.com>2015-12-09 11:42:44 +0800
commitce989175e2aa88093da7748965cbafa086ab3305 (patch)
treea6e3da92edd970e0b90961c7eeaf24bb3452bc29 /src/cl_api.c
parentd47346045626e9f5023e0058b6e6d3ca72818a1f (diff)
downloadbeignet-ce989175e2aa88093da7748965cbafa086ab3305.tar.gz
runtime: fix clCompileProgram bug.
forgot to add FROM_LLVM_SPIR in compileProgram; the BINARY_TYPE is BINARY_TYPE_INTERMIDIATE if create from SPIR binary. v2: refine the source_type logic: source_type is already set in clCreateProgramWithSource or clCreateProgramWithBinary, shouldn't be set in clBuildProgram or clCompileProgram. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
Diffstat (limited to 'src/cl_api.c')
-rw-r--r--src/cl_api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cl_api.c b/src/cl_api.c
index bb56cc53..3baf38ac 100644
--- a/src/cl_api.c
+++ b/src/cl_api.c
@@ -992,6 +992,7 @@ clCompileProgram(cl_program program ,
/* TODO support create program from binary */
assert(program->source_type == FROM_LLVM ||
program->source_type == FROM_SOURCE ||
+ program->source_type == FROM_LLVM_SPIR ||
program->source_type == FROM_BINARY);
if((err = cl_program_compile(program, num_input_headers, input_headers, header_include_names, options)) != CL_SUCCESS) {
goto error;