[Mesa-dev] [PATCH] clover: Return 0 as storage size for local kernel args that are not set
Tom Stellard
thomas.stellard at amd.com
Fri Mar 20 16:29:59 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.
---
src/gallium/state_trackers/clover/core/kernel.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/gallium/state_trackers/clover/core/kernel.cpp b/src/gallium/state_trackers/clover/core/kernel.cpp
index 442762c..f4f8616 100644
--- a/src/gallium/state_trackers/clover/core/kernel.cpp
+++ b/src/gallium/state_trackers/clover/core/kernel.cpp
@@ -399,6 +399,8 @@ kernel::global_argument::unbind(exec_context &ctx) {
size_t
kernel::local_argument::storage() const {
+ if (!_set)
+ return 0;
return _storage;
}
--
2.0.4
More information about the mesa-dev
mailing list