nine: Implement threadpool
authorAxel Davy <axel.davy@ens.fr>
Mon, 17 Nov 2014 15:58:29 +0000 (16:58 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 18 Nov 2014 02:02:54 +0000 (02:02 +0000)
commit7f565845a1f3ec871cccee88e2acf6be2e429797
treee6aa710a658af3c40561d3a7bd495ef45a3f3b81
parent948e6c522827b64cfd9b02eb3ab34e7d1f145017
nine: Implement threadpool

DRI_PRIME setups have different issues due the lack of dma-buf fences
support in the drivers. For DRI3 DRI_PRIME, a race can appear, making
tearings visible, or worse showing older content than expected. Until
dma-buf fences are well supported (and by all drivers), an alternative
is to send the buffers to the server only when rendering has finished.
Since waiting the rendering has finished in the main thread has a
performance impact, this patch uses an additional thread to offload the
wait and the sending of the buffers to the server.

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: David Heidelberg <david@ixit.cz>
Signed-off-by: Axel Davy <axel.davy@ens.fr>
src/gallium/state_trackers/nine/Makefile.sources
src/gallium/state_trackers/nine/adapter9.h
src/gallium/state_trackers/nine/swapchain9.c
src/gallium/state_trackers/nine/swapchain9.h
src/gallium/state_trackers/nine/threadpool.c [new file with mode: 0644]
src/gallium/state_trackers/nine/threadpool.h [new file with mode: 0644]
src/gallium/targets/d3dadapter9/drm.c
src/mesa/drivers/dri/common/xmlpool/t_options.h