Mesa (master): clover: Add constructor for global_argument.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jan 26 05:54:22 UTC 2021
Module: Mesa
Branch: master
Commit: f1cffe2394057ed992cfc4ed2ee2cc727faafbeb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f1cffe2394057ed992cfc4ed2ee2cc727faafbeb
Author: Vinson Lee <vlee at freedesktop.org>
Date: Thu Jan 21 14:00:50 2021 -0800
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 at freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8623>
---
src/gallium/frontends/clover/core/kernel.cpp | 3 +++
src/gallium/frontends/clover/core/kernel.hpp | 2 ++
2 files changed, 5 insertions(+)
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,
More information about the mesa-commit
mailing list