Implement experimental Vulkan backend

This commit is contained in:
Stenzek
2016-08-13 22:57:50 +10:00
parent fdd954e7e7
commit 77a128ab87
59 changed files with 14533 additions and 1 deletions

View File

@ -15,6 +15,7 @@
#include "VideoBackends/Null/VideoBackend.h"
#include "VideoBackends/OGL/VideoBackend.h"
#include "VideoBackends/Software/VideoBackend.h"
#include "VideoBackends/Vulkan/VideoBackend.h"
#include "VideoCommon/VideoBackendBase.h"
@ -35,7 +36,7 @@ __declspec(dllexport) DWORD NvOptimusEnablement = 1;
void VideoBackendBase::PopulateList()
{
// OGL > D3D11 > D3D12 > SW > Null
// OGL > D3D11 > D3D12 > Vulkan > SW > Null
g_available_video_backends.push_back(std::make_unique<OGL::VideoBackend>());
#ifdef _WIN32
g_available_video_backends.push_back(std::make_unique<DX11::VideoBackend>());
@ -48,6 +49,7 @@ void VideoBackendBase::PopulateList()
g_available_video_backends.push_back(std::make_unique<DX12::VideoBackend>());
}
#endif
g_available_video_backends.push_back(std::make_unique<Vulkan::VideoBackend>());
g_available_video_backends.push_back(std::make_unique<SW::VideoSoftware>());
g_available_video_backends.push_back(std::make_unique<Null::VideoBackend>());

View File

@ -88,6 +88,7 @@ void VideoConfig::Load(const std::string& ini_file)
settings->Get("BorderlessFullscreen", &bBorderlessFullscreen, false);
settings->Get("EnableValidationLayer", &bEnableValidationLayer, false);
settings->Get("BackendMultithreading", &bBackendMultithreading, true);
settings->Get("CommandBufferExecuteInterval", &iCommandBufferExecuteInterval, 100);
settings->Get("SWZComploc", &bZComploc, true);
settings->Get("SWZFreeze", &bZFreeze, true);
@ -195,6 +196,7 @@ void VideoConfig::GameIniLoad()
CHECK_SETTING("Video_Settings", "DisableFog", bDisableFog);
CHECK_SETTING("Video_Settings", "BackendMultithreading", bBackendMultithreading);
CHECK_SETTING("Video_Settings", "CommandBufferExecuteInterval", iCommandBufferExecuteInterval);
CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering);
CHECK_SETTING("Video_Enhancements", "MaxAnisotropy",
@ -300,6 +302,7 @@ void VideoConfig::Save(const std::string& ini_file)
settings->Set("BorderlessFullscreen", bBorderlessFullscreen);
settings->Set("EnableValidationLayer", bEnableValidationLayer);
settings->Set("BackendMultithreading", bBackendMultithreading);
settings->Set("CommandBufferExecuteInterval", iCommandBufferExecuteInterval);
settings->Set("SWZComploc", bZComploc);
settings->Set("SWZFreeze", bZFreeze);

View File

@ -149,6 +149,10 @@ struct VideoConfig final
// Multithreaded submission, currently only supported with Vulkan.
bool bBackendMultithreading;
// Early command buffer execution interval in number of draws.
// Currently only supported with Vulkan.
int iCommandBufferExecuteInterval;
// Static config per API
// TODO: Move this out of VideoConfig
struct