summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang, Rong R <rong.r.yang@intel.com>2017-07-21 12:11:05 +0800
committerYang Rong <rong.r.yang@intel.com>2017-07-27 16:19:30 +0800
commit9b7ca443cf7bee8105e819ef2893ee412a75fd30 (patch)
tree3c8f4c3c3d2c10e0860bebf76e3e48e2a1c49e2d
parenteb33de15afbe40a3c8cfc7ff356e449134d98bd5 (diff)
downloadbeignet-9b7ca443cf7bee8105e819ef2893ee412a75fd30.tar.gz
Runtime: fix a cl_gpgpu_bind_image_for_vme NULL SIGSEGV.
Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
-rw-r--r--src/cl_command_queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c
index 43ff8fed..93902c86 100644
--- a/src/cl_command_queue.c
+++ b/src/cl_command_queue.c
@@ -155,7 +155,8 @@ cl_command_queue_bind_image(cl_command_queue queue, cl_kernel k, cl_gpgpu gpgpu,
image->w, image->h, image->depth,
image->row_pitch, image->slice_pitch, (cl_gpgpu_tiling)image->tiling);
//We always setup media surface state, so this surface can be used for vme
- else if( (image->fmt.image_channel_order == CL_R) && (image->fmt.image_channel_data_type == CL_UNORM_INT8) )
+ else if ((image->fmt.image_channel_order == CL_R) && (image->fmt.image_channel_data_type == CL_UNORM_INT8) &&
+ cl_gpgpu_bind_image_for_vme)
cl_gpgpu_bind_image_for_vme(gpgpu, k->images[i].idx + BTI_WORKAROUND_IMAGE_OFFSET, image->base.bo,
image->offset + k->args[id].mem->offset,
image->intel_fmt, image->image_type, image->bpp,