Some work on changing comments, log messages, and variable and function names to reflect that the plugins are not plugins anymore.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7170 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
add_subdirectory(Plugin_VideoOGL)
|
||||
add_subdirectory(Plugin_VideoSoftware)
|
||||
# TODO: Add other plugins here!
|
||||
# TODO: Add other backends here!
|
||||
|
||||
@@ -112,7 +112,7 @@ HRESULT LoadD3DX()
|
||||
if (hD3DXDll) return S_OK;
|
||||
|
||||
// try to load D3DX11 first to check whether we have proper runtime support
|
||||
// try to use the dll the plugin was compiled against first - don't bother about debug runtimes
|
||||
// try to use the dll the backend was compiled against first - don't bother about debug runtimes
|
||||
hD3DXDll = LoadLibraryA(StringFromFormat("d3dx11_%d.dll", D3DX11_SDK_VERSION).c_str());
|
||||
if (!hD3DXDll)
|
||||
{
|
||||
@@ -243,14 +243,14 @@ HRESULT Create(HWND wnd)
|
||||
IDXGIAdapter* adapter;
|
||||
IDXGIOutput* output;
|
||||
hr = PCreateDXGIFactory(__uuidof(IDXGIFactory), (void**)&factory);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to create IDXGIFactory object"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
|
||||
hr = factory->EnumAdapters(g_ActiveConfig.iAdapter, &adapter);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
// try using the first one
|
||||
hr = factory->EnumAdapters(0, &adapter);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate adapters"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate adapters"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
// TODO: Make this configurable
|
||||
@@ -259,7 +259,7 @@ HRESULT Create(HWND wnd)
|
||||
{
|
||||
// try using the first one
|
||||
hr = adapter->EnumOutputs(0, &output);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to enumerate outputs"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
}
|
||||
|
||||
// get supported AA modes
|
||||
@@ -287,7 +287,7 @@ HRESULT Create(HWND wnd)
|
||||
mode_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
|
||||
mode_desc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED;
|
||||
hr = output->FindClosestMatchingMode(&mode_desc, &swap_chain_desc.BufferDesc, NULL);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
if (FAILED(hr)) MessageBox(wnd, _T("Failed to find a supported video mode"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
|
||||
// forcing buffer resolution to xres and yres.. TODO: The new video mode might not actually be supported!
|
||||
swap_chain_desc.BufferDesc.Width = xres;
|
||||
@@ -304,7 +304,7 @@ HRESULT Create(HWND wnd)
|
||||
&featlevel, &context);
|
||||
if (FAILED(hr) || !device || !context || !swapchain)
|
||||
{
|
||||
MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
MessageBox(wnd, _T("Failed to initialize Direct3D.\nMake sure your video card supports at least D3D 10.0"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
SAFE_RELEASE(device);
|
||||
SAFE_RELEASE(context);
|
||||
SAFE_RELEASE(swapchain);
|
||||
@@ -319,7 +319,7 @@ HRESULT Create(HWND wnd)
|
||||
hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
MessageBox(wnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
MessageBox(wnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
SAFE_RELEASE(device);
|
||||
SAFE_RELEASE(context);
|
||||
SAFE_RELEASE(swapchain);
|
||||
@@ -431,7 +431,7 @@ void Reset()
|
||||
HRESULT hr = swapchain->GetBuffer(0, IID_ID3D11Texture2D, (void**)&buf);
|
||||
if (FAILED(hr))
|
||||
{
|
||||
MessageBox(hWnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 plugin"), MB_OK | MB_ICONERROR);
|
||||
MessageBox(hWnd, _T("Failed to get swapchain buffer"), _T("Dolphin Direct3D 11 backend"), MB_OK | MB_ICONERROR);
|
||||
SAFE_RELEASE(device);
|
||||
SAFE_RELEASE(context);
|
||||
SAFE_RELEASE(swapchain);
|
||||
@@ -473,4 +473,4 @@ void Present()
|
||||
|
||||
} // namespace D3D
|
||||
|
||||
} // namespace DX11
|
||||
} // namespace DX11
|
||||
|
||||
@@ -81,8 +81,8 @@ inline void SetDebugObjectName(ID3D11DeviceChild* resource, const char* name)
|
||||
|
||||
// Used to not require the SDK and runtime versions to match:
|
||||
// Linking with d3dx11.lib makes the most recent d3dx11_xx.dll of the
|
||||
// compiler's SDK a requirement, but this plugin works with DX11 runtimes
|
||||
// back to August 2009 even if the plugin was built with June 2010.
|
||||
// compiler's SDK a requirement, but this backend works with DX11 runtimes
|
||||
// back to August 2009 even if the backend was built with June 2010.
|
||||
// Add any d3dx11 functions which you want to use here and load them in Create()
|
||||
typedef HRESULT (WINAPI* D3DX11COMPILEFROMMEMORYTYPE)(LPCSTR, SIZE_T, LPCSTR, const D3D10_SHADER_MACRO*, LPD3D10INCLUDE, LPCSTR, LPCSTR, UINT, UINT, ID3DX11ThreadPump*, ID3D10Blob**, ID3D10Blob**, HRESULT*);
|
||||
typedef HRESULT (WINAPI* D3DX11FILTERTEXTURETYPE)(ID3D11DeviceContext*, ID3D11Resource*, UINT, UINT);
|
||||
@@ -105,4 +105,4 @@ extern CREATEDXGIFACTORY PCreateDXGIFactory;
|
||||
typedef HRESULT (WINAPI* D3D11CREATEDEVICE)(IDXGIAdapter*, D3D_DRIVER_TYPE, HMODULE, UINT, CONST D3D_FEATURE_LEVEL*, UINT, UINT, ID3D11Device**, D3D_FEATURE_LEVEL*, ID3D11DeviceContext**);
|
||||
extern D3D11CREATEDEVICE PD3D11CreateDevice;
|
||||
|
||||
} // namespace DX11
|
||||
} // namespace DX11
|
||||
|
||||
@@ -77,19 +77,6 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
|
||||
SetWindowTextA(EmuWindow::GetWnd(), temp);
|
||||
}
|
||||
|
||||
//void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
//{
|
||||
// _PluginInfo->Version = 0x0100;
|
||||
// //_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
||||
//#ifdef DEBUGFAST
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (DebugFast)");
|
||||
//#elif defined _DEBUG
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11 (Debug)");
|
||||
//#else
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D11");
|
||||
//#endif
|
||||
//}
|
||||
|
||||
std::string VideoBackend::GetName()
|
||||
{
|
||||
return "Direct3D11";
|
||||
@@ -189,8 +176,8 @@ void VideoBackend::Initialize()
|
||||
return;
|
||||
}
|
||||
|
||||
OSD::AddMessage("Dolphin Direct3D11 Video Plugin.", 5000);
|
||||
s_PluginInitialized = true;
|
||||
OSD::AddMessage("Dolphin Direct3D11 Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
@@ -225,7 +212,7 @@ void VideoBackend::Video_Prepare()
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
s_PluginInitialized = false;
|
||||
s_BackendInitialized = false;
|
||||
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
@@ -249,7 +236,7 @@ void VideoBackend::Shutdown()
|
||||
delete g_renderer;
|
||||
EmuWindow::Close();
|
||||
|
||||
s_PluginInitialized = false;
|
||||
s_BackendInitialized = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -412,7 +412,7 @@ HRESULT Create(int adapter, HWND wnd, int _resolution, int aa_mode, bool auto_de
|
||||
{
|
||||
MessageBox(wnd,
|
||||
_T("Failed to initialize Direct3D."),
|
||||
_T("Dolphin Direct3D plugin"), MB_OK | MB_ICONERROR);
|
||||
_T("Dolphin Direct3D Backend"), MB_OK | MB_ICONERROR);
|
||||
return E_FAIL;
|
||||
}
|
||||
}
|
||||
@@ -830,4 +830,4 @@ void SetPixelShader(LPDIRECT3DPIXELSHADER9 shader)
|
||||
|
||||
} // namespace
|
||||
|
||||
} // namespace DX9
|
||||
} // namespace DX9
|
||||
|
||||
@@ -85,19 +85,6 @@ void VideoBackend::UpdateFPSDisplay(const char *text)
|
||||
SetWindowText(EmuWindow::GetWnd(), temp);
|
||||
}
|
||||
|
||||
//void GetDllInfo(PLUGIN_INFO* _PluginInfo)
|
||||
//{
|
||||
// _PluginInfo->Version = 0x0100;
|
||||
// //_PluginInfo->Type = PLUGIN_TYPE_VIDEO;
|
||||
//#ifdef DEBUGFAST
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9 (DebugFast)");
|
||||
//#elif defined _DEBUG
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9 (Debug)");
|
||||
//#else
|
||||
// sprintf_s(_PluginInfo->Name, 100, "Dolphin Direct3D9");
|
||||
//#endif
|
||||
//}
|
||||
|
||||
std::string VideoBackend::GetName()
|
||||
{
|
||||
return "Direct3D9";
|
||||
@@ -174,8 +161,8 @@ void VideoBackend::Initialize()
|
||||
return;
|
||||
}
|
||||
|
||||
OSD::AddMessage("Dolphin Direct3D9 Video Plugin.", 5000);
|
||||
s_PluginInitialized = true;
|
||||
OSD::AddMessage("Dolphin Direct3D9 Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Prepare()
|
||||
@@ -200,13 +187,13 @@ void VideoBackend::Video_Prepare()
|
||||
PixelEngine::Init();
|
||||
DLCache::Init();
|
||||
|
||||
// Notify the core that the video plugin is ready
|
||||
// Notify the core that the video backend is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
}
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
s_PluginInitialized = false;
|
||||
s_BackendInitialized = false;
|
||||
|
||||
s_efbAccessRequested = FALSE;
|
||||
s_FifoShuttingDown = FALSE;
|
||||
|
||||
@@ -593,7 +593,7 @@ void OpenGL_Update()
|
||||
}
|
||||
|
||||
|
||||
// Close plugin
|
||||
// Close backend
|
||||
void OpenGL_Shutdown()
|
||||
{
|
||||
#if defined(USE_WX) && USE_WX
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
|
||||
|
||||
// OpenGL Plugin Documentation
|
||||
// OpenGL Backend Documentation
|
||||
/*
|
||||
|
||||
1.1 Display settings
|
||||
@@ -173,8 +173,8 @@ void VideoBackend::Initialize()
|
||||
if (!OpenGL_Create(640, 480))
|
||||
return;
|
||||
|
||||
OSD::AddMessage("Dolphin OpenGL Video Plugin.", 5000);
|
||||
s_PluginInitialized = true;
|
||||
OSD::AddMessage("Dolphin OpenGL Video Backend.", 5000);
|
||||
s_BackendInitialized = true;
|
||||
}
|
||||
|
||||
// This is called after Initialize() from the Core
|
||||
@@ -213,16 +213,16 @@ void VideoBackend::Video_Prepare()
|
||||
TextureConverter::Init();
|
||||
DLCache::Init();
|
||||
|
||||
// Notify the core that the video plugin is ready
|
||||
// Notify the core that the video backend is ready
|
||||
Core::Callback_CoreMessage(WM_USER_CREATE);
|
||||
|
||||
INFO_LOG(VIDEO, "Video plugin initialized.");
|
||||
INFO_LOG(VIDEO, "Video backend initialized.");
|
||||
|
||||
}
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
s_PluginInitialized = false;
|
||||
s_BackendInitialized = false;
|
||||
|
||||
s_efbAccessRequested = false;
|
||||
s_FifoShuttingDown = false;
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
bool fifoStateRun;
|
||||
|
||||
// set to 0 if using in video common
|
||||
#define SW_PLUGIN 1
|
||||
#define SW_BACKEND 1
|
||||
|
||||
#if (SW_PLUGIN)
|
||||
#if (SW_BACKEND)
|
||||
|
||||
#include "OpcodeDecoder.h"
|
||||
|
||||
@@ -322,7 +322,7 @@ void UpdateInterrupts(u64 userdata)
|
||||
interruptWaiting = false;
|
||||
}
|
||||
|
||||
void UpdateInterruptsFromVideoPlugin(u64 userdata)
|
||||
void UpdateInterruptsFromVideoBackend(u64 userdata)
|
||||
{
|
||||
CoreTiming::ScheduleEvent_Threadsafe(0, et_UpdateInterrupts, userdata);
|
||||
}
|
||||
@@ -405,7 +405,7 @@ void SetStatus()
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
|
||||
{
|
||||
interruptWaiting = true;
|
||||
SWCommandProcessor::UpdateInterruptsFromVideoPlugin(userdata);
|
||||
SWCommandProcessor::UpdateInterruptsFromVideoBackend(userdata);
|
||||
}
|
||||
else
|
||||
SWCommandProcessor::UpdateInterrupts(userdata);
|
||||
@@ -427,7 +427,7 @@ bool RunBuffer()
|
||||
|
||||
u32 availableBytes = writePos - readPos;
|
||||
|
||||
#if (SW_PLUGIN)
|
||||
#if (SW_BACKEND)
|
||||
while (OpcodeDecoder::CommandRunnable(availableBytes))
|
||||
{
|
||||
cpreg.status.CommandIdle = 0;
|
||||
@@ -470,7 +470,7 @@ bool RunBuffer()
|
||||
|
||||
|
||||
// fifo functions
|
||||
#if (SW_PLUGIN)
|
||||
#if (SW_BACKEND)
|
||||
|
||||
void SWFifo_EnterLoop()
|
||||
{
|
||||
|
||||
@@ -34,7 +34,7 @@ void Fifo_EnterLoop();
|
||||
void Fifo_ExitLoop();
|
||||
void Fifo_SetRendering(bool bEnabled);
|
||||
|
||||
// Implemented by the Video Plugin
|
||||
// Implemented by the Video Backend
|
||||
void VideoFifo_CheckSwapRequest();
|
||||
void VideoFifo_CheckSwapRequestAt(u32 xfbAddr, u32 fbWidth, u32 fbHeight);
|
||||
void VideoFifo_CheckEFBAccess();
|
||||
@@ -162,7 +162,7 @@ namespace SWCommandProcessor
|
||||
// for CGPFIFO
|
||||
void GatherPipeBursted();
|
||||
void UpdateInterrupts(u64 userdata);
|
||||
void UpdateInterruptsFromVideoPlugin(u64 userdata);
|
||||
void UpdateInterruptsFromVideoBackend(u64 userdata);
|
||||
|
||||
|
||||
} // end of namespace SWCommandProcessor
|
||||
|
||||
@@ -140,7 +140,7 @@ void UpdateInterrupts()
|
||||
void SetToken_OnMainThread(u64 userdata, int cyclesLate)
|
||||
{
|
||||
g_bSignalTokenInterrupt = true;
|
||||
INFO_LOG(PIXELENGINE, "VIDEO Plugin raises INT_CAUSE_PE_TOKEN (btw, token: %04x)", pereg.token);
|
||||
INFO_LOG(PIXELENGINE, "VIDEO Backend raises INT_CAUSE_PE_TOKEN (btw, token: %04x)", pereg.token);
|
||||
UpdateInterrupts();
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace SWPixelEngine
|
||||
void Write16(const u16 _iValue, const u32 _iAddress);
|
||||
void Write32(const u32 _iValue, const u32 _iAddress);
|
||||
|
||||
// gfx plugin support
|
||||
// gfx backend support
|
||||
void SetToken(const u16 _token, const int _bSetTokenAcknowledge);
|
||||
void SetFinish(void);
|
||||
bool AllowIdleSkipping();
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
|
||||
#define _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
|
||||
#ifndef _VIDEOSOFTWARE_CONFIG_H_
|
||||
#define _VIDEOSOFTWARE_CONFIG_H_
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
@@ -52,4 +52,4 @@ struct SWVideoConfig : NonCopyable
|
||||
|
||||
extern SWVideoConfig g_SWVideoConfig;
|
||||
|
||||
#endif // _PLUGIN_VIDEOSOFTWARE_CONFIG_H_
|
||||
#endif // _VIDEOSOFTWARE_CONFIG_H_
|
||||
|
||||
@@ -100,7 +100,7 @@ void VideoBackend::Video_Prepare()
|
||||
{
|
||||
SWRenderer::Prepare();
|
||||
|
||||
INFO_LOG(VIDEO, "Video plugin initialized.");
|
||||
INFO_LOG(VIDEO, "Video backend initialized.");
|
||||
}
|
||||
|
||||
// Run from the CPU thread (from VideoInterface.cpp)
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
// Official SVN repository and contact information can be found at
|
||||
// http://code.google.com/p/dolphin-emu/
|
||||
|
||||
#ifndef _PLUGIN_VIDEOSOFTWARE_CONFIG_DIAG_H_
|
||||
#define _PLUGIN_VIDEOSOFTWARE_CONFIG_DIAG_H_
|
||||
#ifndef _VIDEOSOFTWARE_CONFIG_DIAG_H_
|
||||
#define _VIDEOSOFTWARE_CONFIG_DIAG_H_
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
Reference in New Issue
Block a user