wined3d: Source resources are always non-NULL in wined3d_cs_exec_blt_sub_resource().

Since fills no longer go through the blitter.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-04-06 23:44:29 +02:00 committed by Alexandre Julliard
parent 8f08aee04d
commit cefd06380c
1 changed files with 3 additions and 6 deletions

View File

@ -1744,17 +1744,14 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void *
}
else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_2D)
{
struct wined3d_surface *dst_surface, *src_surface = NULL;
struct wined3d_surface *dst_surface, *src_surface;
struct wined3d_texture *dst_texture, *src_texture;
RECT dst_rect, src_rect;
dst_texture = texture_from_resource(op->dst_resource);
src_texture = texture_from_resource(op->src_resource);
dst_surface = dst_texture->sub_resources[op->dst_sub_resource_idx].u.surface;
if (op->src_resource)
{
src_texture = texture_from_resource(op->src_resource);
src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface;
}
src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface;
SetRect(&dst_rect, op->dst_box.left, op->dst_box.top, op->dst_box.right, op->dst_box.bottom);
SetRect(&src_rect, op->src_box.left, op->src_box.top, op->src_box.right, op->src_box.bottom);