Debian Codegraph @

Source/Core/VideoBackends/Software/SWGfx.h

raw symbols SCIP
1 // Copyright 2023 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 #pragma once
5
6 #include "VideoCommon/AbstractGfx.h"
7
8 class SWOGLWindow;
9
10 namespace SW
11 {
12 class SWGfx final : public AbstractGfx
13 {
14 public:
15 explicit SWGfx(std::unique_ptr<SWOGLWindow> window);
16 ~SWGfx() override;
17
18 bool IsHeadless() const override;
19 bool SupportsUtilityDrawing() const override;
20
21 std::unique_ptr<AbstractTexture> CreateTexture(const TextureConfig& config,
22 std::string_view name) override;
23 std::unique_ptr<AbstractStagingTexture>
24 CreateStagingTexture(StagingTextureType type, const TextureConfig& config) override;
25 std::unique_ptr<AbstractFramebuffer>
26 CreateFramebuffer(AbstractTexture* color_attachment, AbstractTexture* depth_attachment,
27 std::vector<AbstractTexture*> additional_color_attachments) override;
28
29 bool BindBackbuffer(const ClearColor& clear_color = {}) override;
30
31 std::unique_ptr<AbstractShader>
32 CreateShaderFromSource(ShaderStage stage, std::string_view source,
33 VideoCommon::ShaderIncluder* shader_includer,
34 std::string_view name) override;
35 std::unique_ptr<AbstractShader> CreateShaderFromBinary(ShaderStage stage, const void* data,
36 size_t length,
37 std::string_view name) override;
38 std::unique_ptr<NativeVertexFormat>
39 CreateNativeVertexFormat(const PortableVertexDeclaration& vtx_decl) override;
40 std::unique_ptr<AbstractPipeline> CreatePipeline(const AbstractPipelineConfig& config,
41 const void* cache_data = nullptr,
42 size_t cache_data_length = 0) override;
43
44 void ShowImage(const AbstractTexture* source_texture,
45 const MathUtil::Rectangle<int>& source_rc) override;
46
47 void ScaleTexture(AbstractFramebuffer* dst_framebuffer, const MathUtil::Rectangle<int>& dst_rect,
48 const AbstractTexture* src_texture,
49 const MathUtil::Rectangle<int>& src_rect) override;
50
51 void SetScissorRect(const MathUtil::Rectangle<int>& rc) override;
52
53 void ClearRegion(const MathUtil::Rectangle<int>& target_rc, bool colorEnable, bool alphaEnable,
54 bool zEnable, u32 color, u32 z) override;
55
56 SurfaceInfo GetSurfaceInfo() const override;
57
58 private:
59 std::unique_ptr<SWOGLWindow> m_window;
60 };
61
62 } // namespace SW