Module: wine
Branch: master
Commit: e13d0efb01f21b48c8bea1c248ba0aa47fb29813
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e13d0efb01f21b48c8bea1c24…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv>
Date: Sun Aug 31 17:05:30 2008 +0300
wined3d: Remove glFlush in RealizePalette.
glFlush was added to surface_blt_to_drawable some time ago, which is a
more general fix and makes this one superfluous.
---
dlls/wined3d/surface.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 7870d4b..500b05d 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3812,10 +3812,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_RealizePalette(IWineD3DSurface *iface) {
/* Re-upload the palette */
d3dfmt_p8_upload_palette(iface, convert);
-
- /* Without this some palette updates are missed. This at least happens on Nvidia drivers but
- * it works fine using Mesa. */
- glFlush();
} else {
if(!(This->Flags & SFLAG_INSYSMEM)) {
TRACE("Palette changed with surface that does not have an up to date system memory copy\n");
Module: wine
Branch: master
Commit: 379f4009903a63ee6f5a6c47603c7b958e906042
URL: http://source.winehq.org/git/wine.git/?a=commit;h=379f4009903a63ee6f5a6c476…
Author: Alexander Dorofeyev <alexd4(a)inbox.lv>
Date: Sun Aug 31 17:05:26 2008 +0300
wined3d: Add glFlush when clearing the front buffer in ClearSurface.
---
dlls/wined3d/device.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 609b77f..2085b07 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4995,6 +4995,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa
WINED3DVIEWPORT *vp = &This->stateBlock->viewport;
UINT drawable_width, drawable_height;
IWineD3DSurfaceImpl *depth_stencil = (IWineD3DSurfaceImpl *) This->stencilBufferTarget;
+ IWineD3DSwapChainImpl *swapchain = NULL;
/* When we're clearing parts of the drawable, make sure that the target surface is well up to date in the
* drawable. After the clear we'll mark the drawable up to date, so we have to make sure that this is true
@@ -5164,6 +5165,14 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfa
LEAVE_GL();
+ IWineD3DSurface_GetContainer( (IWineD3DSurface *) target, &IID_IWineD3DSwapChain, (void **)&swapchain);
+ if (swapchain) {
+ if (target == (IWineD3DSurfaceImpl*) swapchain->frontBuffer) {
+ glFlush();
+ }
+ IWineD3DSwapChain_Release((IWineD3DSwapChain *) swapchain);
+ }
+
return WINED3D_OK;
}