Debian Codegraph @

Source/Core/VideoBackends/D3DCommon/Shader.h

raw symbols SCIP
1 // Copyright 2019 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include <optional>
7 #include <string_view>
8 #include "VideoBackends/D3DCommon/D3DCommon.h"
9 #include "VideoCommon/AbstractShader.h"
10
11 namespace D3DCommon
12 {
13 class Shader : public AbstractShader
14 {
15 public:
16 ~Shader() override;
17
18 const BinaryData& GetByteCode() const { return m_bytecode; }
19
20 BinaryData GetBinary() const override;
21
22 static std::optional<BinaryData> CompileShader(D3D_FEATURE_LEVEL feature_level, ShaderStage stage,
23 std::string_view source,
24 VideoCommon::ShaderIncluder* shader_includer);
25
26 static BinaryData CreateByteCode(const void* data, size_t length);
27
28 protected:
29 Shader(ShaderStage stage, BinaryData bytecode);
30
31 BinaryData m_bytecode;
32 };
33
34 } // namespace D3DCommon