wined3d: Get rid of the "AlwaysOffscreen" setting.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-01-24 22:15:26 +01:00 committed by Alexandre Julliard
parent c93f2e3f85
commit ff85cd5f4a
5 changed files with 3 additions and 33 deletions

View File

@ -1752,7 +1752,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
if (color_format->id == WINED3DFMT_P8_UINT) if (color_format->id == WINED3DFMT_P8_UINT)
color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM, target_usage); color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM, target_usage);
/* When "always_offscreen" is enabled, we only use the drawable for /* When using FBOs for off-screen rendering, we only use the drawable for
* presentation blits, and don't do any rendering to it. That means we * presentation blits, and don't do any rendering to it. That means we
* don't need depth or stencil buffers, and can mostly ignore the render * don't need depth or stencil buffers, and can mostly ignore the render
* target format. This wouldn't necessarily be quite correct for 10bpc * target format. This wouldn't necessarily be quite correct for 10bpc
@ -1760,8 +1760,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
* Using the same format regardless of the color/depth/stencil targets * Using the same format regardless of the color/depth/stencil targets
* makes it much less likely that different wined3d instances will set * makes it much less likely that different wined3d instances will set
* conflicting pixel formats. */ * conflicting pixel formats. */
if (wined3d_settings.offscreen_rendering_mode != ORM_BACKBUFFER if (wined3d_settings.offscreen_rendering_mode != ORM_BACKBUFFER)
&& wined3d_settings.always_offscreen)
{ {
color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM, target_usage); color_format = wined3d_get_format(gl_info, WINED3DFMT_B8G8R8A8_UNORM, target_usage);
ds_format = wined3d_get_format(gl_info, WINED3DFMT_UNKNOWN, WINED3DUSAGE_DEPTHSTENCIL); ds_format = wined3d_get_format(gl_info, WINED3DFMT_UNKNOWN, WINED3DUSAGE_DEPTHSTENCIL);

View File

@ -749,8 +749,6 @@ static const struct wined3d_swapchain_ops swapchain_gdi_ops =
static void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) static void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain)
{ {
RECT client_rect;
if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) if (wined3d_settings.offscreen_rendering_mode != ORM_FBO)
return; return;
@ -761,25 +759,6 @@ static void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain)
return; return;
} }
GetClientRect(swapchain->win_handle, &client_rect);
TRACE("Backbuffer %ux%u, window %ux%u.\n",
swapchain->desc.backbuffer_width,
swapchain->desc.backbuffer_height,
client_rect.right, client_rect.bottom);
TRACE("Multisample type %#x, quality %#x.\n",
swapchain->desc.multisample_type,
swapchain->desc.multisample_quality);
if (!wined3d_settings.always_offscreen && !swapchain->desc.multisample_type
&& swapchain->desc.backbuffer_width == client_rect.right
&& swapchain->desc.backbuffer_height == client_rect.bottom)
{
TRACE("Backbuffer dimensions match window dimensions, rendering onscreen.\n");
swapchain->render_to_fbo = FALSE;
return;
}
TRACE("Rendering to FBO.\n"); TRACE("Rendering to FBO.\n");
swapchain->render_to_fbo = TRUE; swapchain->render_to_fbo = TRUE;
} }

View File

@ -1366,7 +1366,7 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned
return TRUE; return TRUE;
case WINED3D_LOCATION_DRAWABLE: case WINED3D_LOCATION_DRAWABLE:
if (!texture->swapchain && wined3d_settings.always_offscreen) if (!texture->swapchain && wined3d_settings.offscreen_rendering_mode != ORM_BACKBUFFER)
ERR("Texture %p does not have a drawable.\n", texture); ERR("Texture %p does not have a drawable.\n", texture);
return TRUE; return TRUE;

View File

@ -82,7 +82,6 @@ struct wined3d_settings wined3d_settings =
TRUE, /* Multisampling enabled by default. */ TRUE, /* Multisampling enabled by default. */
~0u, /* Don't force a specific sample count by default. */ ~0u, /* Don't force a specific sample count by default. */
FALSE, /* No strict draw ordering. */ FALSE, /* No strict draw ordering. */
TRUE, /* Don't try to render onscreen by default. */
FALSE, /* Don't range check relative addressing indices in float constants. */ FALSE, /* Don't range check relative addressing indices in float constants. */
~0U, /* No VS shader model limit by default. */ ~0U, /* No VS shader model limit by default. */
~0U, /* No HS shader model limit by default. */ ~0U, /* No HS shader model limit by default. */
@ -304,12 +303,6 @@ static BOOL wined3d_dll_init(HINSTANCE hInstDLL)
TRACE("Enforcing strict draw ordering.\n"); TRACE("Enforcing strict draw ordering.\n");
wined3d_settings.strict_draw_ordering = TRUE; wined3d_settings.strict_draw_ordering = TRUE;
} }
if (!get_config_key(hkey, appkey, "AlwaysOffscreen", buffer, size)
&& !strcmp(buffer,"disabled"))
{
TRACE("Not always rendering backbuffers offscreen.\n");
wined3d_settings.always_offscreen = FALSE;
}
if (!get_config_key(hkey, appkey, "CheckFloatConstants", buffer, size) if (!get_config_key(hkey, appkey, "CheckFloatConstants", buffer, size)
&& !strcmp(buffer, "enabled")) && !strcmp(buffer, "enabled"))
{ {

View File

@ -298,7 +298,6 @@ struct wined3d_settings
int allow_multisampling; int allow_multisampling;
unsigned int sample_count; unsigned int sample_count;
BOOL strict_draw_ordering; BOOL strict_draw_ordering;
BOOL always_offscreen;
BOOL check_float_constants; BOOL check_float_constants;
unsigned int max_sm_vs; unsigned int max_sm_vs;
unsigned int max_sm_hs; unsigned int max_sm_hs;