[Beignet] [BUG]Unused sampler_t in kernel function get wrong arg_size on 64bit system

Song, Ruiling ruiling.song at intel.com
Sat Jun 8 20:24:01 PDT 2013


If write a kernel function declare a sampler_t without using the sampler.

__kernel void kernel_func(sampler_t sp) { }

When user tries to set it using clSetKernelArg(k,0, sizeof(cl_sampler), &sampler), he will get INVALID_ARG_SIZE error.
The reason looks like the kernel argument was processed as FunctionArgument::VALUE instead of FunctionArgument::SAMPLER.
So, user passed sizeof(cl_sampler) which is 8, but the arg_size get from kernel is 4 on 64bit system.

This bug comes from PIGLIT api test cl-set-kernel-arg.

Thanks!
Ruiling

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20130609/0c51c796/attachment.html>


More information about the Beignet mailing list