Module: wine Branch: master Commit: de8e151f6d97211d09abf3676758dd6885bbc63b URL: http://source.winehq.org/git/wine.git/?a=commit;h=de8e151f6d97211d09abf36767...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Mar 9 16:21:55 2016 +0100
wined3d: Don't call surface_load_ds_location() directly.
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wined3d/device.c | 4 ++-- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/surface.c | 6 ++++-- dlls/wined3d/wined3d_private.h | 2 -- 4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index ff16c9d..d032184 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -203,7 +203,7 @@ void device_switch_onscreen_ds(struct wined3d_device *device, { if (device->onscreen_depth_stencil) { - surface_load_ds_location(device->onscreen_depth_stencil, context, WINED3D_LOCATION_TEXTURE_RGB); + surface_load_location(device->onscreen_depth_stencil, context, WINED3D_LOCATION_TEXTURE_RGB);
surface_modify_ds_location(device->onscreen_depth_stencil, WINED3D_LOCATION_TEXTURE_RGB, device->onscreen_depth_stencil->ds_current_size.cx, @@ -280,7 +280,7 @@ static void prepare_ds_clear(struct wined3d_surface *ds, struct wined3d_context }
/* Full load. */ - surface_load_ds_location(ds, context, location); + surface_load_location(ds, context, location); SetRect(out_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy); }
diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 8941761..4771898 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -661,7 +661,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co
IntersectRect(&r, &draw_rect, ¤t_rect); if (!EqualRect(&r, &draw_rect)) - surface_load_ds_location(ds, context, location); + surface_load_location(ds, context, location); else wined3d_surface_prepare(ds, context, location); } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 487fd3f..e375618 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3213,7 +3213,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface, }
/* Context activation is done by the caller. */ -void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) +static void surface_load_ds_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location) { const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_device *device = surface->resource.device; @@ -3689,8 +3689,10 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
if (surface->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) { - if (location == WINED3D_LOCATION_TEXTURE_RGB + if ((location == WINED3D_LOCATION_TEXTURE_RGB && surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED)) + || (location == WINED3D_LOCATION_DRAWABLE + && surface->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_DISCARDED))) { surface_load_ds_location(surface, context, location); return WINED3D_OK; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 57e6e3f..ecd37a0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2604,8 +2604,6 @@ HRESULT wined3d_surface_init(struct wined3d_surface *surface, GLenum target, unsigned int level, unsigned int layer, DWORD flags) DECLSPEC_HIDDEN; void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN; void surface_load(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; -void surface_load_ds_location(struct wined3d_surface *surface, - struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *context) DECLSPEC_HIDDEN; HRESULT surface_load_location(struct wined3d_surface *surface,