MetalDevice: Implement timed present

This commit is contained in:
Stenzek
2024-09-13 15:19:29 +10:00
parent f2720b98dd
commit 6f31e562a0
14 changed files with 89 additions and 54 deletions

View File

@ -187,6 +187,7 @@ void D3D11Device::SetFeatures(FeatureMask disabled_features)
m_features.partial_msaa_resolve = false;
m_features.memory_import = false;
m_features.explicit_present = false;
m_features.timed_present = false;
m_features.gpu_timing = true;
m_features.shader_cache = true;
m_features.pipeline_cache = false;
@ -674,9 +675,9 @@ GPUDevice::PresentResult D3D11Device::BeginPresent(u32 clear_color)
return PresentResult::OK;
}
void D3D11Device::EndPresent(bool explicit_present)
void D3D11Device::EndPresent(bool explicit_present, u64 present_time)
{
DebugAssert(!explicit_present);
DebugAssert(!explicit_present && present_time == 0);
DebugAssert(m_num_current_render_targets == 0 && !m_current_depth_target);
if (m_vsync_mode != GPUVSyncMode::FIFO && m_gpu_timing_enabled)