summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuo Xionghu <xionghu.luo@intel.com>2014-11-10 14:58:40 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-11-10 14:13:10 +0800
commit9353c602318bb4718fc9380c8ae6edc37e614b38 (patch)
tree6a65c84f567d3b690bd8af28b781032b147b92e6 /src
parent09bd0255f0c5bf81063882bc17ac8b887b556a2d (diff)
fix piglit clCreateProgramWithBinary fail.
the program should be deserialized and loaded when created from a EXECUTABLE binary. Signed-off-by: Luo Xionghu <xionghu.luo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/cl_program.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cl_program.c b/src/cl_program.c
index 79dff34d..a21a4f1f 100644
--- a/src/cl_program.c
+++ b/src/cl_program.c
@@ -249,6 +249,14 @@ cl_program_create_from_binary(cl_context ctx,
program->source_type = FROM_LLVM;
}
else if (*program->binary == 0) {
+ program->opaque = interp_program_new_from_binary(program->ctx->device->vendor_id, program->binary, program->binary_sz);
+ if (UNLIKELY(program->opaque == NULL)) {
+ err = CL_INVALID_PROGRAM;
+ goto error;
+ }
+
+ /* Create all the kernels */
+ TRY (cl_program_load_gen_program, program);
program->binary_type = CL_PROGRAM_BINARY_TYPE_EXECUTABLE;
}