wined3d: Fix error code returned when render target view description is invalid.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia 2016-06-16 11:59:36 +02:00 committed by Alexandre Julliard
parent 838ecc1cb8
commit 3c090180bd
1 changed files with 1 additions and 1 deletions

View File

@ -120,7 +120,7 @@ static HRESULT wined3d_rendertarget_view_init(struct wined3d_rendertarget_view *
|| desc->u.texture.layer_idx >= depth_or_layer_count || desc->u.texture.layer_idx >= depth_or_layer_count
|| !desc->u.texture.layer_count || !desc->u.texture.layer_count
|| desc->u.texture.layer_count > depth_or_layer_count - desc->u.texture.layer_idx) || desc->u.texture.layer_count > depth_or_layer_count - desc->u.texture.layer_idx)
return WINED3DERR_INVALIDCALL; return E_INVALIDARG;
view->sub_resource_idx = desc->u.texture.level_idx; view->sub_resource_idx = desc->u.texture.level_idx;
if (resource->type != WINED3D_RTYPE_TEXTURE_3D) if (resource->type != WINED3D_RTYPE_TEXTURE_3D)