Module: wine Branch: master Commit: c025b5d06b8cdefb5a03e19bfc441022c038fb6a URL: http://source.winehq.org/git/wine.git/?a=commit;h=c025b5d06b8cdefb5a03e19bfc...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Fri Nov 22 10:45:01 2013 +0100
wined3d: surface_load() should never fail.
---
dlls/wined3d/surface.c | 9 ++------- dlls/wined3d/wined3d_private.h | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 878b848..1523d5c 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2255,7 +2255,7 @@ void surface_set_dirty(struct wined3d_surface *surface) wined3d_texture_set_dirty(surface->container); }
-HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) +void surface_load(struct wined3d_surface *surface, BOOL srgb) { DWORD flag = srgb ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE; BOOL ck_changed; @@ -2263,10 +2263,7 @@ HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) TRACE("surface %p, srgb %#x.\n", surface, srgb);
if (surface->resource.pool == WINED3D_POOL_SCRATCH) - { ERR("Not supported on scratch surfaces.\n"); - return WINED3DERR_INVALIDCALL; - }
ck_changed = !(surface->flags & SFLAG_GLCKEY) != !(surface->CKeyFlags & WINEDDSD_CKSRCBLT);
@@ -2293,13 +2290,11 @@ HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) else { TRACE("surface is already in texture\n"); - return WINED3D_OK; + return; }
surface_load_location(surface, flag); surface_evict_sysmem(surface); - - return WINED3D_OK; }
/* See also float_16_to_32() in wined3d_private.h */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 31235f2..e8bc18b 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2251,7 +2251,7 @@ void surface_internal_preload(struct wined3d_surface *surface, struct wined3d_context *context, enum WINED3DSRGB srgb) DECLSPEC_HIDDEN; void surface_invalidate_location(struct wined3d_surface *surface, DWORD location) DECLSPEC_HIDDEN; BOOL surface_is_offscreen(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; -HRESULT surface_load(struct wined3d_surface *surface, BOOL srgb) DECLSPEC_HIDDEN; +void surface_load(struct wined3d_surface *surface, 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) DECLSPEC_HIDDEN;