wined3d: Get rid of surface_set_dirty().
This commit is contained in:
parent
71b982d040
commit
4122cd8083
|
@ -2240,20 +2240,6 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface)
|
||||||
return GL_BACK;
|
return GL_BACK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Slightly inefficient way to handle multiple dirty rects but it works :) */
|
|
||||||
void surface_set_dirty(struct wined3d_surface *surface)
|
|
||||||
{
|
|
||||||
TRACE("surface %p.\n", surface);
|
|
||||||
|
|
||||||
if (!(surface->flags & SFLAG_INSYSMEM) && (surface->flags & SFLAG_INTEXTURE))
|
|
||||||
surface_load_location(surface, SFLAG_INSYSMEM);
|
|
||||||
|
|
||||||
surface_validate_location(surface, SFLAG_INSYSMEM);
|
|
||||||
surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
|
|
||||||
|
|
||||||
wined3d_texture_set_dirty(surface->container);
|
|
||||||
}
|
|
||||||
|
|
||||||
void surface_load(struct wined3d_surface *surface, BOOL srgb)
|
void surface_load(struct wined3d_surface *surface, BOOL srgb)
|
||||||
{
|
{
|
||||||
DWORD flag = srgb ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE;
|
DWORD flag = srgb ? SFLAG_INSRGBTEX : SFLAG_INTEXTURE;
|
||||||
|
|
|
@ -658,7 +658,6 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
||||||
return WINED3DERR_INVALIDCALL;
|
return WINED3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
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;
|
||||||
|
@ -673,7 +672,10 @@ static void texture2d_sub_resource_load(struct wined3d_resource *sub_resource,
|
||||||
static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource,
|
static void texture2d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource,
|
||||||
const struct wined3d_box *dirty_region)
|
const struct wined3d_box *dirty_region)
|
||||||
{
|
{
|
||||||
surface_set_dirty(surface_from_resource(sub_resource));
|
struct wined3d_surface *surface = surface_from_resource(sub_resource);
|
||||||
|
|
||||||
|
surface_load_location(surface, SFLAG_INSYSMEM);
|
||||||
|
surface_invalidate_location(surface, ~SFLAG_INSYSMEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
static void texture2d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||||
|
@ -996,6 +998,7 @@ static void texture3d_sub_resource_load(struct wined3d_resource *sub_resource,
|
||||||
static void texture3d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource,
|
static void texture3d_sub_resource_add_dirty_region(struct wined3d_resource *sub_resource,
|
||||||
const struct wined3d_box *dirty_region)
|
const struct wined3d_box *dirty_region)
|
||||||
{
|
{
|
||||||
|
wined3d_texture_set_dirty(volume_from_resource(sub_resource)->container);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
static void texture3d_sub_resource_cleanup(struct wined3d_resource *sub_resource)
|
||||||
|
|
Loading…
Reference in New Issue