78406: Subject: [PATCH 3/4] wined3d: Make the device parameter to wined3d_device_get_index_buffer() const.
buildbot at buildbot.kegel.com
buildbot at buildbot.kegel.com
Tue Sep 6 12:56:40 CDT 2011
This is an experimental automated build and test service.
Please feel free to ignore this email while we work the kinks out.
The Buildbot has detected a failed build on builder runtests-heaptest while building Wine.
Full details are available at: http://buildbot.kegel.com/builders/runtests-heaptest/builds/3 (though maybe not for long, as I'm still reinstalling the buildbot periodically while experimenting)
BUILD FAILED: failed git
For more info about this message, see http://wiki.winehq.org/BuildBot
-------------- next part --------------
From: Henri Verbeet <hverbeet at codeweavers.com>
Subject: [PATCH 1/4] wined3d: Don't override the swapchain present interval in IWineD3DSurfaceImpl_BltOverride().
Message-Id: <1315250154-1324-1-git-send-email-hverbeet at codeweavers.com>
Date: Mon, 5 Sep 2011 21:15:51 +0200
---
dlls/wined3d/surface.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index de97735..3c88668 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -5346,7 +5346,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
*/
dstSwapchain->presentParms.SwapEffect = WINED3DSWAPEFFECT_COPY;
- dstSwapchain->presentParms.PresentationInterval = WINED3DPRESENT_INTERVAL_IMMEDIATE;
TRACE("Full screen back buffer -> front buffer blt, performing a flip instead.\n");
wined3d_swapchain_present(dstSwapchain, NULL, NULL, dstSwapchain->win_handle, NULL, 0);
--
1.7.3.4
From: Henri Verbeet <hverbeet at codeweavers.com>
Subject: [PATCH 2/4] wined3d: Try doing a present in wined3d_surface_blt() instead of IWineD3DSurfaceImpl_BltOverride().
Message-Id: <1315250154-1324-2-git-send-email-hverbeet at codeweavers.com>
Date: Mon, 5 Sep 2011 21:15:52 +0200
---
dlls/wined3d/surface.c | 74 +++++++++++++++--------------------------------
1 files changed, 24 insertions(+), 50 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 3c88668..706c70a 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1462,7 +1462,7 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
struct wined3d_surface *src_surface, const RECT *src_rect_in, DWORD flags,
const WINEDDBLTFX *fx, WINED3DTEXTUREFILTERTYPE filter)
{
- const struct wined3d_swapchain *src_swapchain, *dst_swapchain;
+ struct wined3d_swapchain *src_swapchain, *dst_swapchain;
struct wined3d_device *device = dst_surface->resource.device;
DWORD src_ds_flags, dst_ds_flags;
RECT src_rect, dst_rect;
@@ -1661,6 +1661,29 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
{
TRACE("Color blit.\n");
+ /* Use present for back -> front blits. The idea behind this is
+ * that present is potentially faster than a blit, in particular
+ * when FBO blits aren't available. Some ddraw applications like
+ * Half-Life and Prince of Persia 3D use Blt() from the backbuffer
+ * to the frontbuffer instead of doing a Flip(). D3D8 and D3D9
+ * applications can't blit directly to the frontbuffer. */
+ if (dst_swapchain && dst_swapchain->back_buffers
+ && dst_surface == dst_swapchain->front_buffer
+ && src_surface == dst_swapchain->back_buffers[0])
+ {
+ WINED3DSWAPEFFECT swap_effect = dst_swapchain->presentParms.SwapEffect;
+
+ TRACE("Using present for backbuffer -> frontbuffer blit.\n");
+
+ /* Set the swap effect to COPY, we don't want the backbuffer
+ * to become undefined. */
+ dst_swapchain->presentParms.SwapEffect = WINED3DSWAPEFFECT_COPY;
+ wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
+ dst_swapchain->presentParms.SwapEffect = swap_effect;
+
+ return WINED3D_OK;
+ }
+
if (fbo_blit_supported(&device->adapter->gl_info, WINED3D_BLIT_OP_COLOR_BLIT,
&src_rect, src_surface->resource.usage, src_surface->resource.pool, src_surface->resource.format,
&dst_rect, dst_surface->resource.usage, dst_surface->resource.pool, dst_surface->resource.format))
@@ -5312,55 +5335,6 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(struct wined3d_surface *dst_surfa
return WINED3DERR_INVALIDCALL;
}
- /* The only case where both surfaces on a swapchain are supported is a
- * back buffer -> front buffer blit on the same swapchain. */
- if (dstSwapchain && dstSwapchain->back_buffers
- && dst_surface == dstSwapchain->front_buffer
- && src_surface == dstSwapchain->back_buffers[0])
- {
- /* Half-Life does a Blt from the back buffer to the front buffer,
- * Full surface size, no flags... Use present instead
- *
- * This path will only be entered for d3d7 and ddraw apps, because
- * d3d8/9 offer no way to blit to the front buffer. */
- for (;;)
- {
- /* These flags are unimportant for the flag check, remove them */
- if (!(flags & ~(WINEDDBLT_DONOTWAIT | WINEDDBLT_WAIT)))
- {
- WINED3DSWAPEFFECT orig_swap = dstSwapchain->presentParms.SwapEffect;
-
- /* The idea behind this is that a glReadPixels and a glDrawPixels call
- * take very long, while a flip is fast.
- * This applies to Half-Life, which does such Blts every time it finished
- * a frame, and to Prince of Persia 3D, which uses this to draw at least the main
- * menu. This is also used by all apps when they do windowed rendering
- *
- * The problem is that flipping is not really the same as copying. After a
- * Blt the front buffer is a copy of the back buffer, and the back buffer is
- * untouched. Therefore it's necessary to override the swap effect
- * and to set it back after the flip.
- *
- * Windowed Direct3D < 7 apps do the same. The D3D7 sdk demos are nice
- * testcases.
- */
-
- dstSwapchain->presentParms.SwapEffect = WINED3DSWAPEFFECT_COPY;
-
- TRACE("Full screen back buffer -> front buffer blt, performing a flip instead.\n");
- wined3d_swapchain_present(dstSwapchain, NULL, NULL, dstSwapchain->win_handle, NULL, 0);
-
- dstSwapchain->presentParms.SwapEffect = orig_swap;
-
- return WINED3D_OK;
- }
- break;
- }
-
- TRACE("Unsupported blit between buffers on the same swapchain\n");
- return WINED3DERR_INVALIDCALL;
- }
-
if (dstSwapchain && dstSwapchain == srcSwapchain)
{
FIXME("Implement hardware blit between two surfaces on the same swapchain\n");
--
1.7.3.4
From: Henri Verbeet <hverbeet at codeweavers.com>
Subject: [PATCH 3/4] wined3d: Make the device parameter to wined3d_device_get_index_buffer() const.
Message-Id: <1315250154-1324-3-git-send-email-hverbeet at codeweavers.com>
Date: Mon, 5 Sep 2011 21:15:53 +0200
---
dlls/wined3d/device.c | 2 +-
include/wine/wined3d.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 966beb5..b7bb19f 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -2402,7 +2402,7 @@ HRESULT CDECL wined3d_device_set_index_buffer(struct wined3d_device *device,
return WINED3D_OK;
}
-HRESULT CDECL wined3d_device_get_index_buffer(struct wined3d_device *device, struct wined3d_buffer **buffer)
+HRESULT CDECL wined3d_device_get_index_buffer(const struct wined3d_device *device, struct wined3d_buffer **buffer)
{
TRACE("device %p, buffer %p.\n", device, buffer);
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index f25a0f5..223812b 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2221,7 +2221,8 @@ HRESULT __cdecl wined3d_device_get_display_mode(struct wined3d_device *device,
HRESULT __cdecl wined3d_device_get_front_buffer_data(struct wined3d_device *device,
UINT swapchain_idx, struct wined3d_surface *dst_surface);
void __cdecl wined3d_device_get_gamma_ramp(struct wined3d_device *device, UINT swapchain_idx, WINED3DGAMMARAMP *ramp);
-HRESULT __cdecl wined3d_device_get_index_buffer(struct wined3d_device *device, struct wined3d_buffer **index_buffer);
+HRESULT __cdecl wined3d_device_get_index_buffer(const struct wined3d_device *device,
+ struct wined3d_buffer **index_buffer);
HRESULT __cdecl wined3d_device_get_light(const struct wined3d_device *device, UINT light_idx, WINED3DLIGHT *light);
HRESULT __cdecl wined3d_device_get_light_enable(const struct wined3d_device *device, UINT light_idx, BOOL *enable);
HRESULT __cdecl wined3d_device_get_material(const struct wined3d_device *device, WINED3DMATERIAL *material);
--
1.7.3.4
More information about the wine-tests-results
mailing list