2014-02-03 14:02:17 +01:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2014-02-03 14:02:17 +01:00
|
|
|
|
|
|
|
// Null Backend Documentation
|
|
|
|
|
|
|
|
// This backend tries not to do anything in the backend,
|
|
|
|
// but everything in VideoCommon.
|
|
|
|
|
|
|
|
#include "VideoBackends/Null/VideoBackend.h"
|
|
|
|
|
2019-07-27 21:50:41 +02:00
|
|
|
#include "Common/Common.h"
|
2019-02-15 02:59:50 +01:00
|
|
|
#include "Common/MsgHandler.h"
|
|
|
|
|
2023-01-27 03:07:05 +01:00
|
|
|
#include "VideoBackends/Null/NullBoundingBox.h"
|
|
|
|
#include "VideoBackends/Null/NullGfx.h"
|
2021-12-10 03:22:16 +01:00
|
|
|
#include "VideoBackends/Null/NullVertexManager.h"
|
|
|
|
#include "VideoBackends/Null/PerfQuery.h"
|
|
|
|
#include "VideoBackends/Null/TextureCache.h"
|
|
|
|
|
2019-02-15 02:59:50 +01:00
|
|
|
#include "VideoCommon/FramebufferManager.h"
|
2023-01-27 03:07:05 +01:00
|
|
|
#include "VideoCommon/Present.h"
|
2014-02-03 14:02:17 +01:00
|
|
|
#include "VideoCommon/VideoBackendBase.h"
|
2016-07-22 01:04:57 +02:00
|
|
|
#include "VideoCommon/VideoCommon.h"
|
2014-02-03 14:02:17 +01:00
|
|
|
#include "VideoCommon/VideoConfig.h"
|
|
|
|
|
|
|
|
namespace Null
|
|
|
|
{
|
2023-03-26 01:16:53 +01:00
|
|
|
void VideoBackend::InitBackendInfo(const WindowSystemInfo& wsi)
|
2014-02-03 14:02:17 +01:00
|
|
|
{
|
2016-07-22 01:04:57 +02:00
|
|
|
g_Config.backend_info.api_type = APIType::Nothing;
|
2017-03-09 15:01:23 +01:00
|
|
|
g_Config.backend_info.MaxTextureSize = 16384;
|
2014-02-03 14:02:17 +01:00
|
|
|
g_Config.backend_info.bSupportsExclusiveFullscreen = true;
|
|
|
|
g_Config.backend_info.bSupportsDualSourceBlend = true;
|
|
|
|
g_Config.backend_info.bSupportsPrimitiveRestart = true;
|
|
|
|
g_Config.backend_info.bSupportsGeometryShaders = true;
|
2016-11-27 09:14:55 +01:00
|
|
|
g_Config.backend_info.bSupportsComputeShaders = false;
|
2014-02-03 14:02:17 +01:00
|
|
|
g_Config.backend_info.bSupports3DVision = false;
|
2016-09-30 15:59:40 +02:00
|
|
|
g_Config.backend_info.bSupportsEarlyZ = true;
|
|
|
|
g_Config.backend_info.bSupportsBindingLayout = true;
|
|
|
|
g_Config.backend_info.bSupportsBBox = true;
|
|
|
|
g_Config.backend_info.bSupportsGSInstancing = true;
|
2014-02-03 14:02:17 +01:00
|
|
|
g_Config.backend_info.bSupportsPostProcessing = false;
|
|
|
|
g_Config.backend_info.bSupportsPaletteConversion = true;
|
|
|
|
g_Config.backend_info.bSupportsClipControl = true;
|
2016-09-30 15:59:40 +02:00
|
|
|
g_Config.backend_info.bSupportsSSAA = true;
|
|
|
|
g_Config.backend_info.bSupportsDepthClamp = true;
|
|
|
|
g_Config.backend_info.bSupportsReversedDepthRange = true;
|
2016-08-13 14:08:46 +02:00
|
|
|
g_Config.backend_info.bSupportsMultithreading = false;
|
2016-11-27 09:14:57 +01:00
|
|
|
g_Config.backend_info.bSupportsGPUTextureDecoding = false;
|
2017-04-16 11:45:22 +02:00
|
|
|
g_Config.backend_info.bSupportsST3CTextures = false;
|
2017-07-27 14:00:04 +02:00
|
|
|
g_Config.backend_info.bSupportsBPTCTextures = false;
|
2017-10-26 07:44:39 +02:00
|
|
|
g_Config.backend_info.bSupportsFramebufferFetch = false;
|
2018-02-25 08:56:09 +01:00
|
|
|
g_Config.backend_info.bSupportsBackgroundCompiling = false;
|
2018-05-25 16:04:18 +02:00
|
|
|
g_Config.backend_info.bSupportsLogicOp = false;
|
2019-03-02 06:03:49 +01:00
|
|
|
g_Config.backend_info.bSupportsLargePoints = false;
|
2020-05-24 08:11:10 +02:00
|
|
|
g_Config.backend_info.bSupportsDepthReadback = false;
|
2019-03-02 06:03:49 +01:00
|
|
|
g_Config.backend_info.bSupportsPartialDepthCopies = false;
|
2019-04-15 13:55:26 +02:00
|
|
|
g_Config.backend_info.bSupportsShaderBinaries = false;
|
|
|
|
g_Config.backend_info.bSupportsPipelineCacheData = false;
|
2021-11-14 05:10:20 +01:00
|
|
|
g_Config.backend_info.bSupportsCoarseDerivatives = false;
|
2021-11-14 05:10:55 +01:00
|
|
|
g_Config.backend_info.bSupportsTextureQueryLevels = false;
|
2021-08-07 05:26:51 +02:00
|
|
|
g_Config.backend_info.bSupportsLodBiasInSampler = false;
|
2022-01-31 03:44:57 +01:00
|
|
|
g_Config.backend_info.bSupportsSettingObjectNames = false;
|
2022-06-21 09:07:35 +02:00
|
|
|
g_Config.backend_info.bSupportsPartialMultisampleResolve = true;
|
2022-06-18 08:09:35 +02:00
|
|
|
g_Config.backend_info.bSupportsDynamicVertexLoader = false;
|
2014-02-03 14:02:17 +01:00
|
|
|
|
|
|
|
// aamodes: We only support 1 sample, so no MSAA
|
2016-09-30 15:59:40 +02:00
|
|
|
g_Config.backend_info.Adapters.clear();
|
2014-02-03 14:02:17 +01:00
|
|
|
g_Config.backend_info.AAModes = {1};
|
|
|
|
}
|
|
|
|
|
2018-10-03 15:03:22 +02:00
|
|
|
bool VideoBackend::Initialize(const WindowSystemInfo& wsi)
|
2014-02-03 14:02:17 +01:00
|
|
|
{
|
2023-01-28 02:53:19 +01:00
|
|
|
return InitializeShared(std::make_unique<NullGfx>(), std::make_unique<VertexManager>(),
|
|
|
|
std::make_unique<PerfQuery>(), std::make_unique<NullBoundingBox>(),
|
|
|
|
std::make_unique<NullRenderer>(), std::make_unique<TextureCache>());
|
2014-02-03 14:02:17 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void VideoBackend::Shutdown()
|
|
|
|
{
|
2018-01-26 06:09:07 +01:00
|
|
|
ShutdownShared();
|
2014-02-03 14:02:17 +01:00
|
|
|
}
|
2019-07-27 21:50:41 +02:00
|
|
|
|
|
|
|
std::string VideoBackend::GetDisplayName() const
|
|
|
|
{
|
|
|
|
// i18n: Null is referring to the null video backend, which renders nothing
|
|
|
|
return _trans("Null");
|
|
|
|
}
|
2018-10-03 15:03:13 +02:00
|
|
|
} // namespace Null
|