[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set v2

Tom Stellard thomas.stellard at amd.com
Mon Mar 23 07:52:44 PDT 2015


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



More information about the mesa-dev mailing list