mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-10 03:11:35 -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.
73 lines
1.9 KiB
C++
73 lines
1.9 KiB
C++
// Copyright 2011 Dolphin Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <optional>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "Common/CommonTypes.h"
|
|
#include "VideoCommon/PerfQueryBase.h"
|
|
|
|
namespace MMIO
|
|
{
|
|
class Mapping;
|
|
}
|
|
class PointerWrap;
|
|
|
|
class AbstractGfx;
|
|
class BoundingBox;
|
|
class TextureCacheBase;
|
|
class VertexManagerBase;
|
|
|
|
enum class FieldType
|
|
{
|
|
Odd,
|
|
Even,
|
|
};
|
|
|
|
class VideoBackendBase
|
|
{
|
|
public:
|
|
virtual ~VideoBackendBase() {}
|
|
virtual bool Initialize(float backbuffer_scale) = 0;
|
|
virtual void Shutdown() = 0;
|
|
|
|
virtual std::string GetConfigName() const = 0;
|
|
virtual std::string GetDisplayName() const { return GetConfigName(); }
|
|
virtual void InitBackendInfo() = 0;
|
|
virtual std::optional<std::string> GetWarningMessage() const { return {}; }
|
|
|
|
static std::string BadShaderFilename(const char* shader_stage, int counter);
|
|
|
|
void Video_OutputXFB(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u64 ticks);
|
|
|
|
u32 Video_GetQueryResult(PerfQueryType type);
|
|
u16 Video_GetBoundingBox(int index);
|
|
|
|
static std::string GetDefaultBackendConfigName();
|
|
static std::string GetDefaultBackendDisplayName();
|
|
static const std::vector<std::unique_ptr<VideoBackendBase>>& GetAvailableBackends();
|
|
static void ActivateBackend(const std::string& name);
|
|
|
|
// Fills the backend_info fields with the capabilities of the selected backend/device.
|
|
static void PopulateBackendInfo();
|
|
|
|
// Wrapper function which pushes the event to the GPU thread.
|
|
void DoState(PointerWrap& p);
|
|
|
|
// Every backend, with its own gfx, vertex manager, perf query and bounding box
|
|
bool InitializeShared(AbstractGfx* gfx,
|
|
VertexManagerBase* vertex_manager,
|
|
PerfQueryBase* perf_query,
|
|
BoundingBox* bounding_box);
|
|
void ShutdownShared();
|
|
|
|
protected:
|
|
bool m_initialized = false;
|
|
};
|
|
|
|
extern VideoBackendBase* g_video_backend;
|