wined3d: Replace surface_modify_location(surface, location, FALSE) calls with surface_invalidate_location().
This commit is contained in:
parent
c6ce5486c0
commit
b62915dabb
@ -2453,7 +2453,7 @@ static void context_setup_target(struct wined3d_context *context, struct wined3d
|
||||
if (context->current_rt->texture_name_srgb)
|
||||
surface_internal_preload(context->current_rt, SRGB_SRGB);
|
||||
surface_internal_preload(context->current_rt, SRGB_RGB);
|
||||
surface_modify_location(context->current_rt, SFLAG_INDRAWABLE, FALSE);
|
||||
surface_invalidate_location(context->current_rt, SFLAG_INDRAWABLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ static void surface_evict_sysmem(struct wined3d_surface *surface)
|
||||
wined3d_resource_free_sysmem(surface->resource.heap_memory);
|
||||
surface->resource.allocatedMemory = NULL;
|
||||
surface->resource.heap_memory = NULL;
|
||||
surface_modify_location(surface, SFLAG_INSYSMEM, FALSE);
|
||||
surface_invalidate_location(surface, SFLAG_INSYSMEM);
|
||||
}
|
||||
|
||||
/* Context activation is done by the caller. */
|
||||
@ -703,8 +703,7 @@ static void surface_release_client_storage(struct wined3d_surface *surface)
|
||||
|
||||
context_release(context);
|
||||
|
||||
surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE);
|
||||
surface_modify_location(surface, SFLAG_INTEXTURE, FALSE);
|
||||
surface_invalidate_location(surface, SFLAG_INTEXTURE | SFLAG_INSRGBTEX);
|
||||
surface_force_reload(surface);
|
||||
}
|
||||
|
||||
@ -818,7 +817,7 @@ static void surface_realize_palette(struct wined3d_surface *surface)
|
||||
|
||||
/* We want to force a palette refresh, so mark the drawable as not being up to date */
|
||||
if (!surface_is_offscreen(surface))
|
||||
surface_modify_location(surface, SFLAG_INDRAWABLE, FALSE);
|
||||
surface_invalidate_location(surface, SFLAG_INDRAWABLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1528,10 +1527,9 @@ static void surface_unload(struct wined3d_resource *resource)
|
||||
{
|
||||
/* Load the surface into system memory */
|
||||
surface_load_location(surface, SFLAG_INSYSMEM, NULL);
|
||||
surface_modify_location(surface, surface->draw_binding, FALSE);
|
||||
surface_invalidate_location(surface, surface->draw_binding);
|
||||
}
|
||||
surface_modify_location(surface, SFLAG_INTEXTURE, FALSE);
|
||||
surface_modify_location(surface, SFLAG_INSRGBTEX, FALSE);
|
||||
surface_invalidate_location(surface, SFLAG_INTEXTURE | SFLAG_INSRGBTEX);
|
||||
surface->flags &= ~(SFLAG_ALLOCATED | SFLAG_SRGBALLOCATED);
|
||||
|
||||
context = context_acquire(device, NULL);
|
||||
@ -5347,7 +5345,7 @@ static void surface_validate_location(struct wined3d_surface *surface, DWORD loc
|
||||
}
|
||||
}
|
||||
|
||||
static void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
void surface_invalidate_location(struct wined3d_surface *surface, DWORD location)
|
||||
{
|
||||
TRACE("surface %p, location %s.\n", surface, debug_surflocation(location & SFLAG_LOCATIONS));
|
||||
|
||||
|
@ -521,7 +521,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
||||
if (!swapchain->render_to_fbo && render_to_fbo && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
surface_load_location(back_buffer, SFLAG_INTEXTURE, NULL);
|
||||
surface_modify_location(back_buffer, SFLAG_INDRAWABLE, FALSE);
|
||||
surface_invalidate_location(back_buffer, SFLAG_INDRAWABLE);
|
||||
swapchain->render_to_fbo = TRUE;
|
||||
swapchain_update_draw_bindings(swapchain);
|
||||
}
|
||||
|
@ -2253,6 +2253,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s,
|
||||
const RECT *rect, const struct wined3d_color *color) DECLSPEC_HIDDEN;
|
||||
GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN;
|
||||
void surface_internal_preload(struct wined3d_surface *surface, 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_ds_location(struct wined3d_surface *surface,
|
||||
|
Loading…
x
Reference in New Issue
Block a user