=?UTF-8?Q?Stefan=20D=C3=B6singer=20?=: wined3d: Discard the backbuffer in swapchain_gl_present() with the "discard" swap effect.

Alexandre Julliard julliard at wine.codeweavers.com
Tue May 17 11:19:39 CDT 2016


Module: wine
Branch: master
Commit: aa475ce23fa295a8f5d0fa120d7b3dac1a5a41b5
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=aa475ce23fa295a8f5d0fa120d7b3dac1a5a41b5

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue May 17 14:01:56 2016 +0200

wined3d: Discard the backbuffer in swapchain_gl_present() with the "discard" swap effect.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wined3d/swapchain.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index f982add..7368cda 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -606,6 +606,9 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain,
      * The FLIP swap effect is not implemented yet. We could mark WINED3D_LOCATION_DRAWABLE
      * up to date and hope WGL flipped front and back buffers and read this data into
      * the FBO. Don't bother about this for now. */
+    if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_DISCARD)
+        wined3d_texture_validate_location(swapchain->back_buffers[swapchain->desc.backbuffer_count - 1],
+                0, WINED3D_LOCATION_DISCARDED);
 
     if (fb->depth_stencil)
     {




More information about the wine-cvs mailing list