mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-06 03:25:36 +00:00
System: Fix bogus SW thread CPU in OSD
This commit is contained in:
parent
e617f17294
commit
ac8461a28b
@ -5717,6 +5717,13 @@ void System::ToggleSoftwareRendering()
|
||||
Settings::GetRendererDisplayName(new_renderer)),
|
||||
Host::OSD_QUICK_DURATION);
|
||||
RecreateGPU(new_renderer);
|
||||
|
||||
// Might have a thread change.
|
||||
if (const Threading::Thread* sw_thread = g_gpu->GetSWThread(); sw_thread)
|
||||
s_last_sw_time = sw_thread->GetCPUTime();
|
||||
else
|
||||
s_last_sw_time = 0;
|
||||
|
||||
g_gpu->UpdateResolutionScale();
|
||||
}
|
||||
|
||||
|
@ -1080,7 +1080,7 @@ void D3D11Device::UnbindTexture(D3D11Texture* tex)
|
||||
{
|
||||
if (m_current_render_targets[i] == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current RT");
|
||||
DEV_LOG("Unbinding current RT");
|
||||
SetRenderTargets(nullptr, 0, m_current_depth_target);
|
||||
break;
|
||||
}
|
||||
@ -1088,7 +1088,7 @@ void D3D11Device::UnbindTexture(D3D11Texture* tex)
|
||||
}
|
||||
else if (tex->IsDepthStencil() && m_current_depth_target == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current DS");
|
||||
DEV_LOG("Unbinding current DS");
|
||||
SetRenderTargets(nullptr, 0, nullptr);
|
||||
}
|
||||
}
|
||||
|
@ -2012,7 +2012,7 @@ void MetalDevice::UnbindTexture(MetalTexture* tex)
|
||||
{
|
||||
if (m_current_render_targets[i] == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current RT");
|
||||
DEV_LOG("Unbinding current RT");
|
||||
SetRenderTargets(nullptr, 0, m_current_depth_target, GPUPipeline::NoRenderPassFlags); // TODO: Wrong
|
||||
break;
|
||||
}
|
||||
@ -2022,7 +2022,7 @@ void MetalDevice::UnbindTexture(MetalTexture* tex)
|
||||
{
|
||||
if (m_current_depth_target == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current DS");
|
||||
DEV_LOG("Unbinding current DS");
|
||||
SetRenderTargets(nullptr, 0, nullptr, GPUPipeline::NoRenderPassFlags);
|
||||
}
|
||||
}
|
||||
|
@ -948,7 +948,7 @@ void OpenGLDevice::UnbindTexture(OpenGLTexture* tex)
|
||||
{
|
||||
if (m_current_render_targets[i] == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current RT");
|
||||
DEV_LOG("Unbinding current RT");
|
||||
SetRenderTargets(nullptr, 0, m_current_depth_target);
|
||||
break;
|
||||
}
|
||||
@ -960,7 +960,7 @@ void OpenGLDevice::UnbindTexture(OpenGLTexture* tex)
|
||||
{
|
||||
if (m_current_depth_target == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current DS");
|
||||
DEV_LOG("Unbinding current DS");
|
||||
SetRenderTargets(nullptr, 0, nullptr);
|
||||
}
|
||||
|
||||
|
@ -3692,7 +3692,7 @@ void VulkanDevice::UnbindTexture(VulkanTexture* tex)
|
||||
{
|
||||
if (m_current_render_targets[i] == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current RT");
|
||||
DEV_LOG("Unbinding current RT");
|
||||
SetRenderTargets(nullptr, 0, m_current_depth_target);
|
||||
break;
|
||||
}
|
||||
@ -3704,7 +3704,7 @@ void VulkanDevice::UnbindTexture(VulkanTexture* tex)
|
||||
{
|
||||
if (m_current_depth_target == tex)
|
||||
{
|
||||
WARNING_LOG("Unbinding current DS");
|
||||
DEV_LOG("Unbinding current DS");
|
||||
SetRenderTargets(nullptr, 0, nullptr);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user