From: Tom Stellard Date: Fri, 20 Mar 2015 22:19:43 +0000 (+0000) Subject: clover: Return 0 as storage size for local kernel args that are not set v2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dfb1ae9d914b7723ef50fdd2efe811feebc045ad;p=mesa.git clover: Return 0 as storage size for local kernel args that are not set v2 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. Reviewed-by: Jan Vesely Reviewed-by: Francisco Jerez Cc: 10.5 10.4 --- diff --git a/src/gallium/state_trackers/clover/core/kernel.hpp b/src/gallium/state_trackers/clover/core/kernel.hpp index bf5998de825..d6432a4df8d 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 {