Commit 990be0ba authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Avoid using the CPU blitter for clearing converted surfaces that aren't…

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: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 92d030c4
......@@ -2551,17 +2551,14 @@ static BOOL ffp_blitter_use_cpu_clear(struct wined3d_rendertarget_view *view)
struct wined3d_texture *texture;
resource = view->resource;
if (resource->pool == WINED3D_POOL_SYSTEM_MEM)
return TRUE;
if (resource->type == WINED3D_RTYPE_BUFFER)
return FALSE;
return resource->pool == WINED3D_POOL_SYSTEM_MEM;
texture = texture_from_resource(resource);
if (!(texture->flags & WINED3D_TEXTURE_PIN_SYSMEM))
return FALSE;
if (texture->sub_resources[view->sub_resource_idx].locations & resource->map_binding)
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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment