Henri Verbeet : wined3d: Check for offscreen contexts inside context_validate_onscreen_formats() itself.
Alexandre Julliard
julliard at winehq.org
Tue May 18 12:32:58 CDT 2010
Module: wine
Branch: master
Commit: e0d6ca57d7ca1bdc74a88e67490004838f028412
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e0d6ca57d7ca1bdc74a88e67490004838f028412
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue May 18 09:53:08 2010 +0200
wined3d: Check for offscreen contexts inside context_validate_onscreen_formats() itself.
---
dlls/wined3d/context.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index 9cbdd46..065fceb 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -1973,7 +1973,7 @@ static void context_validate_onscreen_formats(IWineD3DDeviceImpl *device,
/* Onscreen surfaces are always in a swapchain */
IWineD3DSwapChainImpl *swapchain = (IWineD3DSwapChainImpl *)context->current_rt->container;
- if (!depth_stencil) return;
+ if (context->render_offscreen || !depth_stencil) return;
if (match_depth_stencil_format(swapchain->ds_format, depth_stencil->resource.format_desc)) return;
/* TODO: If the requested format would satisfy the needs of the existing one(reverse match),
@@ -1992,7 +1992,7 @@ void context_apply_blit_state(struct wined3d_context *context, IWineD3DDeviceImp
{
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
- if (!context->render_offscreen) context_validate_onscreen_formats(device, context, NULL);
+ context_validate_onscreen_formats(device, context, NULL);
if (context->render_offscreen)
{
@@ -2032,7 +2032,7 @@ void context_apply_clear_state(struct wined3d_context *context, IWineD3DDeviceIm
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
- if (!context->render_offscreen) context_validate_onscreen_formats(device, context, depth_stencil);
+ context_validate_onscreen_formats(device, context, depth_stencil);
ENTER_GL();
context_apply_fbo_state_blit(context, GL_FRAMEBUFFER, render_target, depth_stencil);
@@ -2078,7 +2078,7 @@ void context_apply_draw_state(struct wined3d_context *context, IWineD3DDeviceImp
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
{
- if (!context->render_offscreen) context_validate_onscreen_formats(device, context, device->depth_stencil);
+ context_validate_onscreen_formats(device, context, device->depth_stencil);
if (!context->render_offscreen)
{
More information about the wine-cvs
mailing list