wined3d: Avoid using the CPU blitter for clearing converted surfaces that aren't current on the CPU.
Since that would imply reading them back, with associated format conversion. Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
92d030c41e
commit
990be0ba50
|
@ -2551,17 +2551,14 @@ static BOOL ffp_blitter_use_cpu_clear(struct wined3d_rendertarget_view *view)
|
||||||
struct wined3d_texture *texture;
|
struct wined3d_texture *texture;
|
||||||
|
|
||||||
resource = view->resource;
|
resource = view->resource;
|
||||||
if (resource->pool == WINED3D_POOL_SYSTEM_MEM)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
if (resource->type == WINED3D_RTYPE_BUFFER)
|
if (resource->type == WINED3D_RTYPE_BUFFER)
|
||||||
return FALSE;
|
return resource->pool == WINED3D_POOL_SYSTEM_MEM;
|
||||||
|
|
||||||
texture = texture_from_resource(resource);
|
texture = texture_from_resource(resource);
|
||||||
if (!(texture->flags & WINED3D_TEXTURE_PIN_SYSMEM))
|
if (texture->sub_resources[view->sub_resource_idx].locations & resource->map_binding)
|
||||||
return FALSE;
|
return resource->pool == WINED3D_POOL_SYSTEM_MEM || (texture->flags & WINED3D_TEXTURE_PIN_SYSMEM);
|
||||||
|
|
||||||
return texture->sub_resources[view->sub_resource_idx].locations & resource->map_binding;
|
return resource->pool == WINED3D_POOL_SYSTEM_MEM && !(texture->flags & WINED3D_TEXTURE_CONVERTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_device *device,
|
static void ffp_blitter_clear(struct wined3d_blitter *blitter, struct wined3d_device *device,
|
||||||
|
|
Loading…
Reference in New Issue