wined3d: Return a failure code if creating the staging texture failed in surface_cpu_blt().

Note that we return immediately. The textures aren't mapped yet here, so we
shouldn't try to unmap them.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2016-04-21 17:05:06 +02:00 committed by Alexandre Julliard
parent aaca15f172
commit 82044bc919

View File

@ -3408,9 +3408,9 @@ static HRESULT surface_cpu_blt(struct wined3d_texture *dst_texture, unsigned int
{ {
if (!(converted_texture = surface_convert_format(src_texture, src_sub_resource_idx, dst_format))) if (!(converted_texture = surface_convert_format(src_texture, src_sub_resource_idx, dst_format)))
{ {
/* The conv function writes a FIXME */ FIXME("Cannot convert %s to %s.\n", debug_d3dformat(src_texture->resource.format->id),
WARN("Cannot convert source surface format to dest format.\n"); debug_d3dformat(dst_texture->resource.format->id));
goto release; return WINED3DERR_NOTAVAILABLE;
} }
src_texture = converted_texture; src_texture = converted_texture;
src_sub_resource_idx = 0; src_sub_resource_idx = 0;