mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 02:45:45 -04:00
HostDisplay: Add threaded presentation for Vulkan renderer
Can add a significant speedup for fast forward. Automatically disabled when vsync is enabled.
This commit is contained in:
@ -71,8 +71,10 @@ public:
|
||||
virtual bool HasRenderDevice() const = 0;
|
||||
virtual bool HasRenderSurface() const = 0;
|
||||
|
||||
virtual bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device) = 0;
|
||||
virtual bool InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device) = 0;
|
||||
virtual bool CreateRenderDevice(const WindowInfo& wi, std::string_view adapter_name, bool debug_device,
|
||||
bool threaded_presentation) = 0;
|
||||
virtual bool InitializeRenderDevice(std::string_view shader_cache_directory, bool debug_device,
|
||||
bool threaded_presentation) = 0;
|
||||
virtual bool MakeRenderContextCurrent() = 0;
|
||||
virtual bool DoneRenderContextCurrent() = 0;
|
||||
virtual void DestroyRenderDevice() = 0;
|
||||
|
@ -474,6 +474,7 @@ void HostInterface::SetDefaultSettings(SettingsInterface& si)
|
||||
si.SetBoolValue("GPU", "UseDebugDevice", false);
|
||||
si.SetBoolValue("GPU", "PerSampleShading", false);
|
||||
si.SetBoolValue("GPU", "UseThread", true);
|
||||
si.SetBoolValue("GPU", "ThreadedPresentation", true);
|
||||
si.SetBoolValue("GPU", "TrueColor", false);
|
||||
si.SetBoolValue("GPU", "ScaledDithering", true);
|
||||
si.SetStringValue("GPU", "TextureFilter", Settings::GetTextureFilterName(Settings::DEFAULT_GPU_TEXTURE_FILTER));
|
||||
@ -613,7 +614,8 @@ void HostInterface::SaveSettings(SettingsInterface& si)
|
||||
void HostInterface::CheckForSettingsChanges(const Settings& old_settings)
|
||||
{
|
||||
if (System::IsValid() && (g_settings.gpu_renderer != old_settings.gpu_renderer ||
|
||||
g_settings.gpu_use_debug_device != old_settings.gpu_use_debug_device))
|
||||
g_settings.gpu_use_debug_device != old_settings.gpu_use_debug_device ||
|
||||
g_settings.gpu_threaded_presentation != old_settings.gpu_threaded_presentation))
|
||||
{
|
||||
AddFormattedOSDMessage(5.0f, TranslateString("OSDMessage", "Switching to %s%s GPU renderer."),
|
||||
Settings::GetRendererName(g_settings.gpu_renderer),
|
||||
|
@ -143,6 +143,7 @@ void Settings::Load(SettingsInterface& si)
|
||||
gpu_use_debug_device = si.GetBoolValue("GPU", "UseDebugDevice", false);
|
||||
gpu_per_sample_shading = si.GetBoolValue("GPU", "PerSampleShading", false);
|
||||
gpu_use_thread = si.GetBoolValue("GPU", "UseThread", true);
|
||||
gpu_threaded_presentation = si.GetBoolValue("GPU", "ThreadedPresentation", true);
|
||||
gpu_true_color = si.GetBoolValue("GPU", "TrueColor", true);
|
||||
gpu_scaled_dithering = si.GetBoolValue("GPU", "ScaledDithering", false);
|
||||
gpu_texture_filter =
|
||||
@ -299,6 +300,7 @@ void Settings::Save(SettingsInterface& si) const
|
||||
si.SetBoolValue("GPU", "UseDebugDevice", gpu_use_debug_device);
|
||||
si.SetBoolValue("GPU", "PerSampleShading", gpu_per_sample_shading);
|
||||
si.SetBoolValue("GPU", "UseThread", gpu_use_thread);
|
||||
si.SetBoolValue("GPU", "ThreadedPresentation", gpu_threaded_presentation);
|
||||
si.SetBoolValue("GPU", "TrueColor", gpu_true_color);
|
||||
si.SetBoolValue("GPU", "ScaledDithering", gpu_scaled_dithering);
|
||||
si.SetStringValue("GPU", "TextureFilter", GetTextureFilterName(gpu_texture_filter));
|
||||
|
@ -97,6 +97,7 @@ struct Settings
|
||||
u32 gpu_resolution_scale = 1;
|
||||
u32 gpu_multisamples = 1;
|
||||
bool gpu_use_thread = true;
|
||||
bool gpu_threaded_presentation = true;
|
||||
bool gpu_use_debug_device = false;
|
||||
bool gpu_per_sample_shading = false;
|
||||
bool gpu_true_color = true;
|
||||
|
Reference in New Issue
Block a user