Henri Verbeet : wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_modify_ds_location() .
Alexandre Julliard
julliard at winehq.org
Mon Apr 19 11:51:15 CDT 2010
Module: wine
Branch: master
Commit: efb3993a3adcfce05489b62ad257da70ad1bdfe1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=efb3993a3adcfce05489b62ad257da70ad1bdfe1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Sun Apr 18 22:50:44 2010 +0200
wined3d: Simply pass an IWineD3DSurfaceImpl pointer to surface_modify_ds_location().
---
dlls/wined3d/device.c | 6 +++---
dlls/wined3d/drawprim.c | 2 +-
dlls/wined3d/surface.c | 16 +++++++---------
dlls/wined3d/swapchain.c | 2 +-
dlls/wined3d/wined3d_private.h | 2 +-
5 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 547b109..1fb0dac 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -4513,7 +4513,7 @@ HRESULT IWineD3DDeviceImpl_ClearSurface(IWineD3DDeviceImpl *This, IWineD3DSurfac
if (Flags & WINED3DCLEAR_ZBUFFER) {
/* Note that WINED3DCLEAR_ZBUFFER implies a depth stencil exists on the device */
DWORD location = context->render_offscreen ? SFLAG_DS_OFFSCREEN : SFLAG_DS_ONSCREEN;
- surface_modify_ds_location(This->stencilBufferTarget, location);
+ surface_modify_ds_location(depth_stencil, location);
}
LEAVE_GL();
@@ -5920,11 +5920,11 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetDepthStencilSurface(IWineD3DDevice *
if (This->stencilBufferTarget) {
if (((IWineD3DSwapChainImpl *)This->swapchains[0])->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
|| ((IWineD3DSurfaceImpl *)This->stencilBufferTarget)->Flags & SFLAG_DISCARD) {
- surface_modify_ds_location(This->stencilBufferTarget, SFLAG_DS_DISCARDED);
+ surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, SFLAG_DS_DISCARDED);
} else {
struct wined3d_context *context = context_acquire(This, This->render_targets[0], CTXUSAGE_RESOURCELOAD);
surface_load_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, context, SFLAG_DS_OFFSCREEN);
- surface_modify_ds_location(This->stencilBufferTarget, SFLAG_DS_OFFSCREEN);
+ surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, SFLAG_DS_OFFSCREEN);
context_release(context);
}
}
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c
index 03927c9..ed641a6 100644
--- a/dlls/wined3d/drawprim.c
+++ b/dlls/wined3d/drawprim.c
@@ -614,7 +614,7 @@ void drawPrimitive(IWineD3DDevice *iface, UINT index_count, UINT StartIdx, UINT
|| This->stateBlock->renderState[WINED3DRS_ZENABLE])
surface_load_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, context, location);
if (This->stateBlock->renderState[WINED3DRS_ZWRITEENABLE])
- surface_modify_ds_location(This->stencilBufferTarget, location);
+ surface_modify_ds_location((IWineD3DSurfaceImpl *)This->stencilBufferTarget, location);
}
/* Ok, we will be updating the screen from here onwards so grab the lock */
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index d376e28..a91acb1 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4054,17 +4054,15 @@ static void surface_depth_blt(IWineD3DSurfaceImpl *This, const struct wined3d_gl
device->shader_backend->shader_deselect_depth_blt((IWineD3DDevice *)device);
}
-void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location) {
- IWineD3DSurfaceImpl *This = (IWineD3DSurfaceImpl *)iface;
-
- TRACE("(%p) New location %#x\n", This, location);
+void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, DWORD location)
+{
+ TRACE("surface %p, new location %#x.\n", surface, location);
- if (location & ~SFLAG_DS_LOCATIONS) {
- FIXME("(%p) Invalid location (%#x) specified\n", This, location);
- }
+ if (location & ~SFLAG_DS_LOCATIONS)
+ FIXME("Invalid location (%#x) specified.\n", location);
- This->Flags &= ~SFLAG_DS_LOCATIONS;
- This->Flags |= location;
+ surface->Flags &= ~SFLAG_DS_LOCATIONS;
+ surface->Flags |= location;
}
/* Context activation is done by the caller. */
diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c
index 8c78fac..934979b 100644
--- a/dlls/wined3d/swapchain.c
+++ b/dlls/wined3d/swapchain.c
@@ -464,7 +464,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_Present(IWineD3DSwapChain *iface, CO
if (This->presentParms.Flags & WINED3DPRESENTFLAG_DISCARD_DEPTHSTENCIL
|| ((IWineD3DSurfaceImpl *)This->device->stencilBufferTarget)->Flags & SFLAG_DISCARD)
{
- surface_modify_ds_location(This->device->stencilBufferTarget, SFLAG_DS_DISCARDED);
+ surface_modify_ds_location((IWineD3DSurfaceImpl *)This->device->stencilBufferTarget, SFLAG_DS_DISCARDED);
}
}
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 42bafca..9bcfc7f 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2679,7 +2679,7 @@ void surface_add_dirty_rect(IWineD3DSurface *iface, const RECT *dirty_rect) DECL
GLenum surface_get_gl_buffer(IWineD3DSurface *iface) DECLSPEC_HIDDEN;
void surface_load_ds_location(IWineD3DSurfaceImpl *surface,
struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
-void surface_modify_ds_location(IWineD3DSurface *iface, DWORD location) DECLSPEC_HIDDEN;
+void surface_modify_ds_location(IWineD3DSurfaceImpl *surface, DWORD location) DECLSPEC_HIDDEN;
void surface_set_compatible_renderbuffer(IWineD3DSurface *iface,
unsigned int width, unsigned int height) DECLSPEC_HIDDEN;
void surface_set_texture_name(IWineD3DSurface *iface, GLuint name, BOOL srgb_name) DECLSPEC_HIDDEN;
More information about the wine-cvs
mailing list