summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibGPU/Shader.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibGPU/Shader.h')
-rw-r--r--Userland/Libraries/LibGPU/Shader.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Userland/Libraries/LibGPU/Shader.h b/Userland/Libraries/LibGPU/Shader.h
new file mode 100644
index 0000000000..c96a8d0dea
--- /dev/null
+++ b/Userland/Libraries/LibGPU/Shader.h
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2022, Stephan Unverwerth <s.unverwerth@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/RefCounted.h>
+
+namespace GPU {
+
+class Shader : public RefCounted<Shader> {
+public:
+ Shader(void const* ownership_token)
+ : m_ownership_token { ownership_token }
+ {
+ }
+
+ virtual ~Shader() = default;
+
+ void const* ownership_token() const { return m_ownership_token; }
+ bool has_same_ownership_token(Shader const& other) const { return other.ownership_token() == ownership_token(); }
+
+private:
+ void const* const m_ownership_token { nullptr };
+};
+
+}