mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-02 16:38:09 +02:00
st/nine: Don't present if window is occluded
The problem is that if one d3d present call fails, because of our occlusion check in present method, the next presentation call will send the same pixmap to the Xserver again, without waiting it is released, which is wrong. Move the present call after occlusion check to return and prevent Xpixmaps errors. Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
parent
c673c46ccf
commit
72be473ad1
1 changed files with 6 additions and 5 deletions
|
|
@ -778,17 +778,13 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
|
|||
D3DWindowBuffer *handle_temp;
|
||||
struct threadpool_task *task_temp;
|
||||
int i;
|
||||
HRESULT hr = present(This, pSourceRect, pDestRect,
|
||||
hDestWindowOverride, pDirtyRegion, dwFlags);
|
||||
HRESULT hr;
|
||||
|
||||
DBG("This=%p pSourceRect=%p pDestRect=%p hDestWindowOverride=%p "
|
||||
"pDirtyRegion=%p dwFlags=%d\n",
|
||||
This, pSourceRect, pDestRect, hDestWindowOverride,
|
||||
pDirtyRegion,dwFlags);
|
||||
|
||||
if (hr == D3DERR_WASSTILLDRAWING)
|
||||
return hr;
|
||||
|
||||
if (This->base.device->ex) {
|
||||
if (NineSwapChain9_GetOccluded(This)) {
|
||||
return S_PRESENT_OCCLUDED;
|
||||
|
|
@ -803,6 +799,11 @@ NineSwapChain9_Present( struct NineSwapChain9 *This,
|
|||
}
|
||||
}
|
||||
|
||||
hr = present(This, pSourceRect, pDestRect,
|
||||
hDestWindowOverride, pDirtyRegion, dwFlags);
|
||||
if (hr == D3DERR_WASSTILLDRAWING)
|
||||
return hr;
|
||||
|
||||
switch (This->params.SwapEffect) {
|
||||
case D3DSWAPEFFECT_FLIP:
|
||||
UNTESTED(4);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue