From e43a39421eb537756145b07081079adf6d610f4e Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 21 Aug 2008 18:23:32 +0200 Subject: [PATCH] wined3d: Move depth stencil location handling code up a couple of lines This is just for clarity, so that render targets and the depth stencil are handled in the same place. --- dlls/wined3d/drawprim.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 59e1f64..b0f6a53 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -5,7 +5,7 @@ * Copyright 2002-2004 Raphael Junqueira * Copyright 2004 Christian Costa * Copyright 2005 Oliver Stieber - * Copyright 2006 Henri Verbeet + * Copyright 2006, 2008 Henri Verbeet * Copyright 2007-2008 Stefan Dösinger for CodeWeavers * * This library is free software; you can redistribute it and/or @@ -936,6 +936,12 @@ void drawPrimitive(IWineD3DDevice *iface, } } + if (This->stencilBufferTarget) { + DWORD location = This->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; + surface_load_ds_location(This->stencilBufferTarget, location); + surface_modify_ds_location(This->stencilBufferTarget, location); + } + /* Signals other modules that a drawing is in progress and the stateblock finalized */ This->isInDraw = TRUE; @@ -944,12 +950,6 @@ void drawPrimitive(IWineD3DDevice *iface, ActivateContext(This, This->render_targets[0], CTXUSAGE_DRAWPRIM); ENTER_GL(); - if (This->stencilBufferTarget) { - DWORD location = This->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN; - surface_load_ds_location(This->stencilBufferTarget, location); - surface_modify_ds_location(This->stencilBufferTarget, location); - } - { GLenum glPrimType; BOOL emulation = FALSE; -- 1.5.6.4