Debian Codegraph @

Source/Core/VideoBackends/Null/NullBackend.cpp

raw symbols SCIP
1 // Copyright 2015 Dolphin Emulator Project
2 // SPDX-License-Identifier: GPL-2.0-or-later
3
4 // Null Backend Documentation
5
6 // This backend tries not to do anything in the backend,
7 // but everything in VideoCommon.
8
9 #include "VideoBackends/Null/VideoBackend.h"
10
11 #include "Common/Common.h"
12
13 #include "VideoBackends/Null/NullBoundingBox.h"
14 #include "VideoBackends/Null/NullGfx.h"
15 #include "VideoBackends/Null/NullVertexManager.h"
16 #include "VideoBackends/Null/PerfQuery.h"
17 #include "VideoBackends/Null/TextureCache.h"
18
19 #include "VideoCommon/VideoCommon.h"
20 #include "VideoCommon/VideoConfig.h"
21
22 namespace Null
23 {
24 void VideoBackend::InitBackendInfo(const WindowSystemInfo& wsi)
25 {
26 g_backend_info.api_type = APIType::Nothing;
27 g_backend_info.MaxTextureSize = 16384;
28 g_backend_info.bSupportsExclusiveFullscreen = true;
29 g_backend_info.bSupportsDualSourceBlend = true;
30 g_backend_info.bSupportsPrimitiveRestart = true;
31 g_backend_info.bSupportsGeometryShaders = true;
32 g_backend_info.bSupportsComputeShaders = false;
33 g_backend_info.bSupports3DVision = false;
34 g_backend_info.bSupportsEarlyZ = true;
35 g_backend_info.bSupportsBindingLayout = true;
36 g_backend_info.bSupportsBBox = true;
37 g_backend_info.bSupportsGSInstancing = true;
38 g_backend_info.bSupportsPostProcessing = false;
39 g_backend_info.bSupportsPaletteConversion = true;
40 g_backend_info.bSupportsClipControl = true;
41 g_backend_info.bSupportsSSAA = true;
42 g_backend_info.bSupportsDepthClamp = true;
43 g_backend_info.bSupportsReversedDepthRange = true;
44 g_backend_info.bSupportsMultithreading = false;
45 g_backend_info.bSupportsGPUTextureDecoding = false;
46 g_backend_info.bSupportsST3CTextures = false;
47 g_backend_info.bSupportsBPTCTextures = false;
48 g_backend_info.bSupportsFramebufferFetch = false;
49 g_backend_info.bSupportsBackgroundCompiling = false;
50 g_backend_info.bSupportsLogicOp = false;
51 g_backend_info.bSupportsLargePoints = false;
52 g_backend_info.bSupportsDepthReadback = false;
53 g_backend_info.bSupportsPartialDepthCopies = false;
54 g_backend_info.bSupportsShaderBinaries = false;
55 g_backend_info.bSupportsPipelineCacheData = false;
56 g_backend_info.bSupportsCoarseDerivatives = false;
57 g_backend_info.bSupportsTextureQueryLevels = false;
58 g_backend_info.bSupportsLodBiasInSampler = false;
59 g_backend_info.bSupportsSettingObjectNames = false;
60 g_backend_info.bSupportsPartialMultisampleResolve = true;
61 g_backend_info.bSupportsDynamicVertexLoader = false;
62
63 // aamodes: We only support 1 sample, so no MSAA
64 g_backend_info.Adapters.clear();
65 g_backend_info.AAModes = {1};
66 }
67
68 bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
69 {
70 return InitializeShared(std::make_unique<NullGfx>(), std::make_unique<VertexManager>(),
71 std::make_unique<PerfQuery>(), std::make_unique<NullBoundingBox>(),
72 std::make_unique<NullEFBInterface>(), std::make_unique<TextureCache>());
73 }
74
75 void VideoBackend::Shutdown()
76 {
77 ShutdownShared();
78 }
79
80 std::string VideoBackend::GetDisplayName() const
81 {
82 // i18n: Null is referring to the null video backend, which renders nothing
83 return _trans("Null");
84 }
85 } // namespace Null