Module: wine Branch: master Commit: 440320ce39b0f7a0578e57096745a240d5303e49 URL: https://source.winehq.org/git/wine.git/?a=commit;h=440320ce39b0f7a0578e57096...
Author: Philip Rebohle philip.rebohle@tu-dortmund.de Date: Fri Apr 17 20:39:16 2020 +0430
dxgi: Implement d3d12_swapchain_SetMaximumFrameLatency().
Signed-off-by: Philip Rebohle philip.rebohle@tu-dortmund.de Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/dxgi/swapchain.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index c13868fdc2..8e0f2b2239 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -2608,9 +2608,24 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetSourceSize(IDXGISwapChain3 *
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMaximumFrameLatency(IDXGISwapChain3 *iface, UINT max_latency) { - FIXME("iface %p, max_latency %u stub!\n", iface, max_latency); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface);
- return E_NOTIMPL; + TRACE("iface %p, max_latency %u.\n", iface, max_latency); + + if (!(swapchain->desc.Flags & DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT)) + { + WARN("DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT not set for swap chain %p.\n", iface); + return DXGI_ERROR_INVALID_CALL; + } + + if (!max_latency) + { + WARN("Invalid maximum frame latency %u.\n", max_latency); + return DXGI_ERROR_INVALID_CALL; + } + + swapchain->frame_latency = max_latency; + return S_OK; }
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMaximumFrameLatency(IDXGISwapChain3 *iface, UINT *max_latency)