Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
739 stars 185 forks source link

performance: Use fence to sync GPU/CPU when using D3D12 #924

Closed karasusan closed 1 year ago

karasusan commented 1 year ago

Related this PR. https://github.com/Unity-Technologies/com.unity.webrtc/pull/923

This PR fixes the native code of DX12 graphic device to improve performance of the rendering thread. I profiled the loads of the rendering thread, and compared two results. This comparison can show the performance improvement that reduces the loads of waiting time for command buffer to copy texture.

Before image

After profile-ssao-dx12

We will deal with other graphics device Metal and GLCore near future.