diff options
author | Axel Davy <[email protected]> | 2014-11-17 16:58:28 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-11-18 02:02:54 +0000 |
commit | 948e6c522827b64cfd9b02eb3ab34e7d1f145017 (patch) | |
tree | 2734a1d64207a2cfa902d515af5877001aca32ed /src/gallium/state_trackers/nine | |
parent | fdd96578ef2dfe9c4ad5aab5858036298d444a64 (diff) |
nine: Add drirc options (v2)
Implements vblank_mode and throttling, which allows us change default ratio
between framerate and input lag.
Acked-by: Jose Fonseca <[email protected]>
Signed-off-by: David Heidelberg <[email protected]>
Signed-off-by: Axel Davy <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r-- | src/gallium/state_trackers/nine/adapter9.h | 1 | ||||
-rw-r--r-- | src/gallium/state_trackers/nine/swapchain9.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/nine/adapter9.h b/src/gallium/state_trackers/nine/adapter9.h index c743347b6af..4db4f3cfd53 100644 --- a/src/gallium/state_trackers/nine/adapter9.h +++ b/src/gallium/state_trackers/nine/adapter9.h @@ -37,6 +37,7 @@ struct d3dadapter9_context BOOL linear_framebuffer; BOOL throttling; int throttling_value; + int vblank_mode; void (*destroy)( struct d3dadapter9_context *ctx ); }; diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c index b6e81257aba..ce92a3a8966 100644 --- a/src/gallium/state_trackers/nine/swapchain9.c +++ b/src/gallium/state_trackers/nine/swapchain9.c @@ -164,6 +164,11 @@ NineSwapChain9_Resize( struct NineSwapChain9 *This, if (This->desired_fences > DRI_SWAP_FENCES_MAX) This->desired_fences = DRI_SWAP_FENCES_MAX; + if (This->actx->vblank_mode == 0) + pParams->PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; + else if (This->actx->vblank_mode == 3) + pParams->PresentationInterval = D3DPRESENT_INTERVAL_ONE; + if (mode && This->mode) { *(This->mode) = *mode; } else if (mode) { |