From 4f423a598fa51912f1dcd15e349cfbbb317eaa4b Mon Sep 17 00:00:00 2001 From: bsegovia Date: Tue, 29 Nov 2011 05:01:22 +0000 Subject: [PATCH] Fixed compilation while using the old compiler --- src/cl_kernel.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/cl_kernel.c b/src/cl_kernel.c index 4b67d7d..8f77ebb 100644 --- a/src/cl_kernel.c +++ b/src/cl_kernel.c @@ -364,12 +364,22 @@ cl_kernel_setup_patch_list(cl_kernel k, const char *patch, size_t sz) arg_info->offset = from->offset; arg_info->type = OCLRT_ARG_TYPE_CONST; } +#if USE_OLD_COMPILER + else if (item->token == PATCH_TOKEN_IMAGE_MEMORY_KERNEL_ARGUMENT) { + cl_global_memory_object_arg_t *from = (cl_global_memory_object_arg_t *) patch; + arg_info->arg_index = from->index; + arg_info->offset = from->offset; + arg_info->type = OCLRT_ARG_TYPE_IMAGE; + } +#else else if (item->token == PATCH_TOKEN_IMAGE_MEMORY_KERNEL_ARGUMENT) { cl_image_memory_object_arg_t *from = (cl_image_memory_object_arg_t *) patch; arg_info->arg_index = from->index; arg_info->offset = from->offset; arg_info->type = OCLRT_ARG_TYPE_IMAGE; - } else + } +#endif + else assert(0); arg_info->sz = sizeof(cl_mem); -- 2.7.4