wined3d: Get rid of the "dirty" flag to wined3d_texture_set_dirty().

This commit is contained in:
Henri Verbeet 2013-09-09 10:26:17 +02:00 committed by Alexandre Julliard
parent bcbd13b70c
commit c44012f0c1
4 changed files with 12 additions and 12 deletions

View File

@ -2488,7 +2488,7 @@ void surface_add_dirty_rect(struct wined3d_surface *surface, const struct wined3
if (surface->container) if (surface->container)
{ {
TRACE("Passing to container.\n"); 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) if (surface->container)
{ {
TRACE("Passing to container.\n"); 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) if (surface->container)
{ {
TRACE("Passing to container.\n"); TRACE("Passing to container.\n");
wined3d_texture_set_dirty(surface->container, TRUE); wined3d_texture_set_dirty(surface->container);
} }
} }
surface->flags &= ~SFLAG_LOCATIONS; surface->flags &= ~SFLAG_LOCATIONS;
@ -5376,7 +5376,7 @@ void surface_modify_location(struct wined3d_surface *surface, DWORD location, BO
if (surface->container) if (surface->container)
{ {
TRACE("Passing to container\n"); TRACE("Passing to container\n");
wined3d_texture_set_dirty(surface->container, TRUE); wined3d_texture_set_dirty(surface->container);
} }
} }
surface->flags &= ~location; surface->flags &= ~location;

View File

@ -114,7 +114,7 @@ static void wined3d_texture_unload(struct wined3d_texture *texture)
if (context) context_release(context); if (context) context_release(context);
wined3d_texture_set_dirty(texture, TRUE); wined3d_texture_set_dirty(texture);
resource_unload(&texture->resource); resource_unload(&texture->resource);
} }
@ -139,10 +139,10 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture)
resource_cleanup(&texture->resource); 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_rgb.dirty = TRUE;
texture->texture_srgb.dirty = dirty; texture->texture_srgb.dirty = TRUE;
} }
/* Context activation is done by the caller. */ /* Context activation is done by the caller. */
@ -195,7 +195,7 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
else else
gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = srgb; gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = srgb;
gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE; gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE;
wined3d_texture_set_dirty(texture, TRUE); wined3d_texture_set_dirty(texture);
new_texture = TRUE; new_texture = TRUE;
if (texture->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP) if (texture->resource.usage & WINED3DUSAGE_AUTOGENMIPMAP)
@ -592,7 +592,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
return WINED3DERR_INVALIDCALL; 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); texture->texture_ops->texture_sub_resource_add_dirty_region(sub_resource, dirty_region);
return WINED3D_OK; return WINED3D_OK;

View File

@ -605,7 +605,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume,
if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY))) 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) if (volume->flags & WINED3D_VFLAG_PBO)
wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_BUFFER); wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_BUFFER);

View File

@ -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, void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1], const DWORD samplerStates[WINED3D_HIGHEST_SAMPLER_STATE + 1],
const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; 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_LOCKED 0x00000001
#define WINED3D_VFLAG_ALLOCATED 0x00000002 #define WINED3D_VFLAG_ALLOCATED 0x00000002