Commit 620c81dc authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add a registry key to disable rendering swapchains onscreen.

We'll probably want to make this default to TRUE at some point, but at least for the moment there still seem to be some performance advantages to rendering onscreen in most cases.
parent 4b1ba0e0
......@@ -824,7 +824,8 @@ void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain)
swapchain->presentParms.BackBufferHeight,
client_rect.right, client_rect.bottom);
if (swapchain->presentParms.BackBufferWidth == client_rect.right
if (!wined3d_settings.always_offscreen
&& swapchain->presentParms.BackBufferWidth == client_rect.right
&& swapchain->presentParms.BackBufferHeight == client_rect.bottom)
{
TRACE("Backbuffer dimensions match window dimensions, rendering onscreen.\n");
......
......@@ -86,6 +86,7 @@ struct wined3d_settings wined3d_settings =
NULL, /* No wine logo by default */
FALSE, /* Disable multisampling for now due to Nvidia driver bugs which happens for some users */
FALSE, /* No strict draw ordering. */
FALSE, /* Try to render onscreen by default. */
};
/* Do not call while under the GL lock. */
......@@ -340,6 +341,12 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
TRACE("Enforcing strict draw ordering.\n");
wined3d_settings.strict_draw_ordering = TRUE;
}
if (!get_config_key(hkey, appkey, "AlwaysOffscreen", buffer, size)
&& !strcmp(buffer,"enabled"))
{
TRACE("Always rendering backbuffers offscreen.\n");
wined3d_settings.always_offscreen = TRUE;
}
}
if (wined3d_settings.vs_mode == VS_HW)
TRACE("Allow HW vertex shaders\n");
......
......@@ -271,6 +271,7 @@ struct wined3d_settings
char *logo;
int allow_multisampling;
BOOL strict_draw_ordering;
BOOL always_offscreen;
};
extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment