[host] dxgi: sleep until it's close to time to map

This change adds an average function to time how long it takes the GPU
to copy and map the texture, and then uses this average to sleep for 80%
of this average lowering CPU usage and potentially decreasing lock
contention.
This commit is contained in:
Geoffrey McRae
2021-06-06 09:35:50 +10:00
committed by Geoffrey McRae
parent 7f5f46c448
commit f02d61d665
4 changed files with 118 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ set(COMMON_SOURCES
src/framebuffer.c
src/KVMFR.c
src/countedbuffer.c
src/runningavg.c
)
add_library(lg_common STATIC ${COMMON_SOURCES})