summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2021-01-21 14:00:50 -0800
committerMarge Bot <eric+marge@anholt.net>2021-01-26 05:30:39 +0000
commitf1cffe2394057ed992cfc4ed2ee2cc727faafbeb (patch)
tree9d2ba5167e9badf1e183602b2640534c4a1fbd27
parent001722b3a301312d2ec16c939376098dc11fab98 (diff)
clover: Add constructor for global_argument.
Fix defects reported by Coverity Scan. member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize buf. member_not_init_in_gen_ctor: The compiler-generated constructor for this class does not initialize svm. Signed-off-by: Vinson Lee <vlee@freedesktop.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8623>
-rw-r--r--src/gallium/frontends/clover/core/kernel.cpp3
-rw-r--r--src/gallium/frontends/clover/core/kernel.hpp2
2 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/frontends/clover/core/kernel.cpp b/src/gallium/frontends/clover/core/kernel.cpp
index 0ca34cb7643..91873578e0f 100644
--- a/src/gallium/frontends/clover/core/kernel.cpp
+++ b/src/gallium/frontends/clover/core/kernel.cpp
@@ -453,6 +453,9 @@ void
kernel::scalar_argument::unbind(exec_context &ctx) {
}
+kernel::global_argument::global_argument() : buf(nullptr), svm(nullptr) {
+}
+
void
kernel::global_argument::set(size_t size, const void *value) {
if (size != sizeof(cl_mem))
diff --git a/src/gallium/frontends/clover/core/kernel.hpp b/src/gallium/frontends/clover/core/kernel.hpp
index 57627e983bc..fe82245cdc0 100644
--- a/src/gallium/frontends/clover/core/kernel.hpp
+++ b/src/gallium/frontends/clover/core/kernel.hpp
@@ -167,6 +167,8 @@ namespace clover {
class global_argument : public argument {
public:
+ global_argument();
+
virtual void set(size_t size, const void *value);
virtual void set_svm(const void *value);
virtual void bind(exec_context &ctx,