2014-02-03 06:02:17 -07:00
|
|
|
// Copyright 2015 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
// Null Backend Documentation
|
|
|
|
|
|
|
|
// This backend tries not to do anything in the backend,
|
|
|
|
// but everything in VideoCommon.
|
|
|
|
|
|
|
|
#include "VideoBackends/Null/PerfQuery.h"
|
|
|
|
#include "VideoBackends/Null/Render.h"
|
|
|
|
#include "VideoBackends/Null/TextureCache.h"
|
|
|
|
#include "VideoBackends/Null/VertexManager.h"
|
|
|
|
#include "VideoBackends/Null/VideoBackend.h"
|
|
|
|
|
2017-08-06 22:05:42 -06:00
|
|
|
#include "VideoCommon/FramebufferManagerBase.h"
|
2014-02-03 06:02:17 -07:00
|
|
|
#include "VideoCommon/VideoBackendBase.h"
|
2016-07-21 17:04:57 -06:00
|
|
|
#include "VideoCommon/VideoCommon.h"
|
2014-02-03 06:02:17 -07:00
|
|
|
#include "VideoCommon/VideoConfig.h"
|
|
|
|
|
|
|
|
namespace Null
|
|
|
|
{
|
2016-01-13 13:38:11 -07:00
|
|
|
void VideoBackend::InitBackendInfo()
|
2014-02-03 06:02:17 -07:00
|
|
|
{
|
2016-07-21 17:04:57 -06:00
|
|
|
g_Config.backend_info.api_type = APIType::Nothing;
|
2017-03-09 07:01:23 -07:00
|
|
|
g_Config.backend_info.MaxTextureSize = 16384;
|
2014-02-03 06:02:17 -07:00
|
|
|
g_Config.backend_info.bSupportsExclusiveFullscreen = true;
|
|
|
|
g_Config.backend_info.bSupportsDualSourceBlend = true;
|
|
|
|
g_Config.backend_info.bSupportsPrimitiveRestart = true;
|
|
|
|
g_Config.backend_info.bSupportsOversizedViewports = true;
|
|
|
|
g_Config.backend_info.bSupportsGeometryShaders = true;
|
2016-11-27 01:14:55 -07:00
|
|
|
g_Config.backend_info.bSupportsComputeShaders = false;
|
2014-02-03 06:02:17 -07:00
|
|
|
g_Config.backend_info.bSupports3DVision = false;
|
2016-09-30 07:59:40 -06: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 06:02:17 -07:00
|
|
|
g_Config.backend_info.bSupportsPostProcessing = false;
|
|
|
|
g_Config.backend_info.bSupportsPaletteConversion = true;
|
|
|
|
g_Config.backend_info.bSupportsClipControl = true;
|
2016-09-30 07:59:40 -06:00
|
|
|
g_Config.backend_info.bSupportsSSAA = true;
|
|
|
|
g_Config.backend_info.bSupportsDepthClamp = true;
|
|
|
|
g_Config.backend_info.bSupportsReversedDepthRange = true;
|
2016-08-13 06:08:46 -06:00
|
|
|
g_Config.backend_info.bSupportsMultithreading = false;
|
2016-11-27 01:14:57 -07:00
|
|
|
g_Config.backend_info.bSupportsGPUTextureDecoding = false;
|
2017-04-16 03:45:22 -06:00
|
|
|
g_Config.backend_info.bSupportsST3CTextures = false;
|
2017-07-27 06:00:04 -06:00
|
|
|
g_Config.backend_info.bSupportsBPTCTextures = false;
|
2017-10-25 23:44:39 -06:00
|
|
|
g_Config.backend_info.bSupportsFramebufferFetch = false;
|
2018-02-25 00:56:09 -07:00
|
|
|
g_Config.backend_info.bSupportsBackgroundCompiling = false;
|
2014-02-03 06:02:17 -07:00
|
|
|
|
|
|
|
// aamodes: We only support 1 sample, so no MSAA
|
2016-09-30 07:59:40 -06:00
|
|
|
g_Config.backend_info.Adapters.clear();
|
2014-02-03 06:02:17 -07:00
|
|
|
g_Config.backend_info.AAModes = {1};
|
|
|
|
}
|
|
|
|
|
|
|
|
bool VideoBackend::Initialize(void* window_handle)
|
|
|
|
{
|
|
|
|
InitializeShared();
|
|
|
|
InitBackendInfo();
|
|
|
|
|
|
|
|
g_renderer = std::make_unique<Renderer>();
|
|
|
|
g_vertex_manager = std::make_unique<VertexManager>();
|
|
|
|
g_perf_query = std::make_unique<PerfQuery>();
|
2017-08-06 22:05:42 -06:00
|
|
|
g_framebuffer_manager = std::make_unique<FramebufferManagerBase>();
|
2014-02-03 06:02:17 -07:00
|
|
|
g_texture_cache = std::make_unique<TextureCache>();
|
2018-02-24 08:15:35 -07:00
|
|
|
g_shader_cache = std::make_unique<VideoCommon::ShaderCache>();
|
|
|
|
return g_shader_cache->Initialize();
|
2014-02-03 06:02:17 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void VideoBackend::Shutdown()
|
|
|
|
{
|
2018-02-24 08:15:35 -07:00
|
|
|
g_shader_cache->Shutdown();
|
2018-01-25 22:09:07 -07:00
|
|
|
g_renderer->Shutdown();
|
2014-02-03 06:02:17 -07:00
|
|
|
|
|
|
|
g_texture_cache.reset();
|
|
|
|
g_perf_query.reset();
|
|
|
|
g_vertex_manager.reset();
|
|
|
|
g_framebuffer_manager.reset();
|
|
|
|
g_renderer.reset();
|
2018-01-25 22:09:07 -07:00
|
|
|
|
|
|
|
ShutdownShared();
|
2014-02-03 06:02:17 -07:00
|
|
|
}
|
|
|
|
}
|