From c44012f0c1d75e999206a67af607473ea3b3ecae Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 9 Sep 2013 10:26:17 +0200 Subject: [PATCH] wined3d: Get rid of the "dirty" flag to wined3d_texture_set_dirty(). --- dlls/wined3d/surface.c | 8 ++++---- dlls/wined3d/texture.c | 12 ++++++------ dlls/wined3d/volume.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 011be7ad377..fb88082e4da 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2488,7 +2488,7 @@ void surface_add_dirty_rect(struct wined3d_surface *surface, const struct wined3 if (surface->container) { TRACE("Passing to container.\n"); - wined3d_texture_set_dirty(surface->container, TRUE); + wined3d_texture_set_dirty(surface->container); } } @@ -5162,7 +5162,7 @@ void surface_modify_ds_location(struct wined3d_surface *surface, if (surface->container) { TRACE("Passing to container.\n"); - wined3d_texture_set_dirty(surface->container, TRUE); + wined3d_texture_set_dirty(surface->container); } } @@ -5354,7 +5354,7 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD location, BO if (surface->container) { TRACE("Passing to container.\n"); - wined3d_texture_set_dirty(surface->container, TRUE); + wined3d_texture_set_dirty(surface->container); } } surface->flags &= ~SFLAG_LOCATIONS; @@ -5376,7 +5376,7 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD location, BO if (surface->container) { TRACE("Passing to container\n"); - wined3d_texture_set_dirty(surface->container, TRUE); + wined3d_texture_set_dirty(surface->container); } } surface->flags &= ~location; diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index e60a426d88d..e9173ce570c 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -114,7 +114,7 @@ static void wined3d_texture_unload(struct wined3d_texture *texture) if (context) context_release(context); - wined3d_texture_set_dirty(texture, TRUE); + wined3d_texture_set_dirty(texture); resource_unload(&texture->resource); } @@ -139,10 +139,10 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture) resource_cleanup(&texture->resource); } -void wined3d_texture_set_dirty(struct wined3d_texture *texture, BOOL dirty) +void wined3d_texture_set_dirty(struct wined3d_texture *texture) { - texture->texture_rgb.dirty = dirty; - texture->texture_srgb.dirty = dirty; + texture->texture_rgb.dirty = TRUE; + texture->texture_srgb.dirty = TRUE; } /* Context activation is done by the caller. */ @@ -195,7 +195,7 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture, else gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = srgb; gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE; - wined3d_texture_set_dirty(texture, TRUE); + wined3d_texture_set_dirty(texture); new_texture = TRUE; if (texture->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP) @@ -592,7 +592,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture, return WINED3DERR_INVALIDCALL; } - wined3d_texture_set_dirty(texture, TRUE); + wined3d_texture_set_dirty(texture); texture->texture_ops->texture_sub_resource_add_dirty_region(sub_resource, dirty_region); return WINED3D_OK; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index a1c787630b3..7f2dbf9177b 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -605,7 +605,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY))) { - wined3d_texture_set_dirty(volume->container, TRUE); + wined3d_texture_set_dirty(volume->container); if (volume->flags & WINED3D_VFLAG_PBO) wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_BUFFER); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5a8ced0aaf8..b771869640e 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2108,7 +2108,7 @@ static inline struct gl_texture *wined3d_texture_get_gl_texture(struct wined3d_t void wined3d_texture_apply_state_changes(struct wined3d_texture *texture, const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1], const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; -void wined3d_texture_set_dirty(struct wined3d_texture *texture, BOOL dirty) DECLSPEC_HIDDEN; +void wined3d_texture_set_dirty(struct wined3d_texture *texture) DECLSPEC_HIDDEN; #define WINED3D_VFLAG_LOCKED 0x00000001 #define WINED3D_VFLAG_ALLOCATED 0x00000002