Henri Verbeet : wined3d: Enable "AlwaysOffscreen" by default.
Alexandre Julliard
julliard at winehq.org
Thu Jul 19 13:23:43 CDT 2012
Module: wine
Branch: master
Commit: 09443f14e75e134328643b5d33aff61bdf4dca32
URL: http://source.winehq.org/git/wine.git/?a=commit;h=09443f14e75e134328643b5d33aff61bdf4dca32
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed Jul 18 21:32:34 2012 +0200
wined3d: Enable "AlwaysOffscreen" by default.
---
dlls/d3d8/tests/visual.c | 20 +++++++++++---------
dlls/d3d9/tests/visual.c | 23 +++++++++++++----------
dlls/wined3d/wined3d_main.c | 8 ++++----
3 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index 191cf08..6aaf365 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -1983,11 +1983,6 @@ static void depth_buffer_test(IDirect3DDevice8 *device)
hr = IDirect3DDevice8_SetRenderTarget(device, backbuffer, depth_stencil);
ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr);
- IDirect3DSurface8_Release(depth_stencil);
- IDirect3DSurface8_Release(backbuffer);
- IDirect3DSurface8_Release(rt3);
- IDirect3DSurface8_Release(rt2);
- IDirect3DSurface8_Release(rt1);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE);
ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
@@ -2015,6 +2010,12 @@ static void depth_buffer_test(IDirect3DDevice8 *device)
hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
+
+ IDirect3DSurface8_Release(depth_stencil);
+ IDirect3DSurface8_Release(backbuffer);
+ IDirect3DSurface8_Release(rt3);
+ IDirect3DSurface8_Release(rt2);
+ IDirect3DSurface8_Release(rt1);
}
/* Test that partial depth copies work the way they're supposed to. The clear
@@ -2086,10 +2087,6 @@ static void depth_buffer2_test(IDirect3DDevice8 *device)
hr = IDirect3DDevice8_SetRenderTarget(device, backbuffer, depth_stencil);
ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr);
- IDirect3DSurface8_Release(depth_stencil);
- IDirect3DSurface8_Release(backbuffer);
- IDirect3DSurface8_Release(rt2);
- IDirect3DSurface8_Release(rt1);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE);
ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
@@ -2115,6 +2112,11 @@ static void depth_buffer2_test(IDirect3DDevice8 *device)
hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
+
+ IDirect3DSurface8_Release(depth_stencil);
+ IDirect3DSurface8_Release(backbuffer);
+ IDirect3DSurface8_Release(rt2);
+ IDirect3DSurface8_Release(rt1);
}
static void intz_test(IDirect3DDevice8 *device)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index be2d7dc..a67ce52 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -11362,10 +11362,6 @@ static void depth_buffer_test(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer);
ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr);
- IDirect3DSurface9_Release(backbuffer);
- IDirect3DSurface9_Release(rt3);
- IDirect3DSurface9_Release(rt2);
- IDirect3DSurface9_Release(rt1);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE);
ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
@@ -11393,6 +11389,11 @@ static void depth_buffer_test(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
+
+ IDirect3DSurface9_Release(backbuffer);
+ IDirect3DSurface9_Release(rt3);
+ IDirect3DSurface9_Release(rt2);
+ IDirect3DSurface9_Release(rt1);
}
/* Test that partial depth copies work the way they're supposed to. The clear
@@ -11461,9 +11462,6 @@ static void depth_buffer2_test(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_SetRenderTarget(device, 0, backbuffer);
ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr);
- IDirect3DSurface9_Release(backbuffer);
- IDirect3DSurface9_Release(rt2);
- IDirect3DSurface9_Release(rt1);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE);
ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
@@ -11489,6 +11487,10 @@ static void depth_buffer2_test(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
+
+ IDirect3DSurface9_Release(backbuffer);
+ IDirect3DSurface9_Release(rt2);
+ IDirect3DSurface9_Release(rt1);
}
static void depth_blit_test(IDirect3DDevice9 *device)
@@ -11595,9 +11597,6 @@ static void depth_blit_test(IDirect3DDevice9 *device)
ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr);
hr = IDirect3DDevice9_StretchRect(device, ds2, NULL, ds1, NULL, D3DTEXF_POINT);
ok(SUCCEEDED(hr), "StretchRect failed, hr %#x.\n", hr);
- IDirect3DSurface9_Release(ds3);
- IDirect3DSurface9_Release(ds2);
- IDirect3DSurface9_Release(ds1);
hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE);
ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr);
@@ -11624,6 +11623,10 @@ static void depth_blit_test(IDirect3DDevice9 *device)
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr);
+
+ IDirect3DSurface9_Release(ds3);
+ IDirect3DSurface9_Release(ds2);
+ IDirect3DSurface9_Release(ds1);
}
static void intz_test(IDirect3DDevice9 *device)
diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c
index 526c749..fb8493c 100644
--- a/dlls/wined3d/wined3d_main.c
+++ b/dlls/wined3d/wined3d_main.c
@@ -87,7 +87,7 @@ struct wined3d_settings wined3d_settings =
NULL, /* No wine logo by default */
TRUE, /* Multisampling enabled by default. */
FALSE, /* No strict draw ordering. */
- FALSE, /* Try to render onscreen by default. */
+ TRUE, /* Don't try to render onscreen by default. */
};
/* Do not call while under the GL lock. */
@@ -338,10 +338,10 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
wined3d_settings.strict_draw_ordering = TRUE;
}
if (!get_config_key(hkey, appkey, "AlwaysOffscreen", buffer, size)
- && !strcmp(buffer,"enabled"))
+ && !strcmp(buffer,"disabled"))
{
- TRACE("Always rendering backbuffers offscreen.\n");
- wined3d_settings.always_offscreen = TRUE;
+ TRACE("Not always rendering backbuffers offscreen.\n");
+ wined3d_settings.always_offscreen = FALSE;
}
}
if (wined3d_settings.vs_mode == VS_HW)
More information about the wine-cvs
mailing list