diff --git a/projects/clr/opencl/api/opencl/amdocl/cl_program.cpp b/projects/clr/opencl/api/opencl/amdocl/cl_program.cpp index 0ce55dbcc7..8c71b17a6f 100644 --- a/projects/clr/opencl/api/opencl/amdocl/cl_program.cpp +++ b/projects/clr/opencl/api/opencl/amdocl/cl_program.cpp @@ -1562,7 +1562,8 @@ RUNTIME_ENTRY(cl_int, clSetKernelArg, } } if ((!is_local && (arg_size != desc.size_)) || (is_local && (arg_size == 0))) { - if (LP64_ONLY(true ||) (desc.type_ != T_POINTER) || (arg_size != sizeof(void*))) { + if (LP64_ONLY(true ||) ((desc.type_ != T_POINTER) && (desc.type_ != T_SAMPLER)) || + (arg_size != sizeof(void*))) { as_amd(kernel)->parameters().reset(static_cast(arg_index)); return CL_INVALID_ARG_SIZE; }