mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-11 03:11:28 -10:00
Of it, the backends read the EFB scale, now passed as the backbuffer scale; GLContext::Create tested for libretro, its only context; and the controller interface kept a render window that is always null. The video backends' Initialize, InitBackendInfo and PopulateBackendInfo, Core::Init, EmuThread and StartEmuThread, BootCore and the controller interface lose the parameter; PrepareWindow, ChangeWindow, the window change refresh and the Vulkan instance's surface extensions go, as nothing presents but the frontend.
96 lines
3.0 KiB
C++
96 lines
3.0 KiB
C++
// Copyright 2009 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include "VideoBackends/Software/VideoBackend.h"
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include <utility>
|
|
|
|
#include "Common/Common.h"
|
|
#include "Common/CommonTypes.h"
|
|
|
|
#include "VideoBackends/Software/Clipper.h"
|
|
#include "VideoBackends/Software/Rasterizer.h"
|
|
#include "VideoBackends/Software/SWBoundingBox.h"
|
|
#include "VideoBackends/Software/SWEfbInterface.h"
|
|
#include "VideoBackends/Software/SWGfx.h"
|
|
#include "VideoBackends/Software/SWPerfQuery.h"
|
|
#include "VideoBackends/Software/SWVertexLoader.h"
|
|
|
|
#include "VideoCommon/VideoCommon.h"
|
|
#include "VideoCommon/VideoConfig.h"
|
|
|
|
namespace SW
|
|
{
|
|
std::string VideoSoftware::GetConfigName() const
|
|
{
|
|
return CONFIG_NAME;
|
|
}
|
|
|
|
std::string VideoSoftware::GetDisplayName() const
|
|
{
|
|
return _trans("Software Renderer");
|
|
}
|
|
|
|
std::optional<std::string> VideoSoftware::GetWarningMessage() const
|
|
{
|
|
return _trans("The software renderer is significantly slower than other "
|
|
"backends and is only recommended for debugging purposes.\n\nDo you "
|
|
"really want to enable software rendering? If unsure, select 'No'.");
|
|
}
|
|
|
|
void VideoSoftware::InitBackendInfo()
|
|
{
|
|
g_backend_info.api_type = APIType::Nothing;
|
|
g_backend_info.MaxTextureSize = 16384;
|
|
g_backend_info.bUsesLowerLeftOrigin = false;
|
|
g_backend_info.bSupports3DVision = false;
|
|
g_backend_info.bSupportsDualSourceBlend = true;
|
|
g_backend_info.bSupportsEarlyZ = true;
|
|
g_backend_info.bSupportsPrimitiveRestart = false;
|
|
g_backend_info.bSupportsMultithreading = false;
|
|
g_backend_info.bSupportsComputeShaders = false;
|
|
g_backend_info.bSupportsGPUTextureDecoding = false;
|
|
g_backend_info.bSupportsST3CTextures = false;
|
|
g_backend_info.bSupportsBPTCTextures = false;
|
|
g_backend_info.bSupportsCopyToVram = false;
|
|
g_backend_info.bSupportsLargePoints = false;
|
|
g_backend_info.bSupportsDepthReadback = false;
|
|
g_backend_info.bSupportsPartialDepthCopies = false;
|
|
g_backend_info.bSupportsFramebufferFetch = false;
|
|
g_backend_info.bSupportsBackgroundCompiling = false;
|
|
g_backend_info.bSupportsLogicOp = true;
|
|
g_backend_info.bSupportsShaderBinaries = false;
|
|
g_backend_info.bSupportsPipelineCacheData = false;
|
|
g_backend_info.bSupportsBBox = true;
|
|
g_backend_info.bSupportsCoarseDerivatives = false;
|
|
g_backend_info.bSupportsTextureQueryLevels = false;
|
|
g_backend_info.bSupportsLodBiasInSampler = false;
|
|
g_backend_info.bSupportsSettingObjectNames = false;
|
|
g_backend_info.bSupportsPartialMultisampleResolve = true;
|
|
g_backend_info.bSupportsDynamicVertexLoader = false;
|
|
|
|
// aamodes
|
|
g_backend_info.AAModes = {1};
|
|
}
|
|
|
|
bool VideoSoftware::Initialize(float backbuffer_scale)
|
|
{
|
|
Clipper::Init();
|
|
Rasterizer::Init();
|
|
|
|
AbstractGfx* const gfx = new SWGfx();
|
|
VertexManagerBase* const vertex_manager = new SWVertexLoader();
|
|
PerfQueryBase* const perf_query = new PerfQuery();
|
|
BoundingBox* const bounding_box = new SWBoundingBox();
|
|
|
|
return InitializeShared(gfx, vertex_manager, perf_query, bounding_box);
|
|
}
|
|
|
|
void VideoSoftware::Shutdown()
|
|
{
|
|
ShutdownShared();
|
|
}
|
|
} // namespace SW
|