summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/swapchain9.c
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2015-10-09 00:08:43 +0200
committerAxel Davy <[email protected]>2016-02-04 22:12:17 +0100
commit0ac01a9fd7794fd0eb5893ebcb13fb4cfa57d754 (patch)
tree490f4a776d81b4d5959e8ee49a41c81ddd26ad5d /src/gallium/state_trackers/nine/swapchain9.c
parentf481b9b952552da48af83e9fd041d73ba47b73f7 (diff)
st/nine: Call flush_resource before flush
flush_resource needs to be called before flush (for fast clear resolve, etc). Removes useless computation of resource (it is already set correctly). Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/swapchain9.c')
-rw-r--r--src/gallium/state_trackers/nine/swapchain9.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gallium/state_trackers/nine/swapchain9.c b/src/gallium/state_trackers/nine/swapchain9.c
index 697df89592d..c8d3ca15890 100644
--- a/src/gallium/state_trackers/nine/swapchain9.c
+++ b/src/gallium/state_trackers/nine/swapchain9.c
@@ -716,6 +716,10 @@ present( struct NineSwapChain9 *This,
This->pipe->blit(This->pipe, &blit);
}
+ /* The resource we present has to resolve fast clears
+ * if needed (and other things) */
+ This->pipe->flush_resource(This->pipe, resource);
+
if (This->params.SwapEffect != D3DSWAPEFFECT_DISCARD)
handle_draw_cursor_and_hud(This, resource);
@@ -741,12 +745,6 @@ bypass_rendering:
return D3DERR_WASSTILLDRAWING;
}
- if (This->present_buffers)
- resource = This->present_buffers[0];
- else
- resource = This->buffers[0]->base.resource;
- This->pipe->flush_resource(This->pipe, resource);
-
if (!This->enable_threadpool) {
This->tasks[0]=NULL;
fence = swap_fences_pop_front(This);