[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set v2
Francisco Jerez
currojerez at riseup.net
Mon Mar 23 10:47:37 PDT 2015
Tom Stellard <thomas.stellard at amd.com> writes:
> The storage size for local kernel args can be queried before the
> arguments are set by using the CL_KERNEL_LOCAL_MEM_SIZE param
> of clGetKernelWorkGroupInfo().
>
> The spec says that if local kernel arguments have not been specified,
> then we should assume their size is 0.
>
> v2:
> - Implement using c++11 member initialization.
> ---
> src/gallium/state_trackers/clover/core/kernel.hpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/state_trackers/clover/core/kernel.hpp b/src/gallium/state_trackers/clover/core/kernel.hpp
> index bf5998d..d6432a4 100644
> --- a/src/gallium/state_trackers/clover/core/kernel.hpp
> +++ b/src/gallium/state_trackers/clover/core/kernel.hpp
> @@ -175,7 +175,7 @@ namespace clover {
> virtual void unbind(exec_context &ctx);
>
> private:
> - size_t _storage;
> + size_t _storage = 0;
> };
>
> class constant_argument : public argument {
> --
> 2.0.4
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 212 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150323/b514ae9a/attachment.sig>
More information about the mesa-dev
mailing list