wined3d: Fix error codes returned when creating shader resource views.

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:31 +02:00 committed by Alexandre Julliard
parent 37840f84ff
commit b44b0690d3

View file

@ -279,7 +279,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
if (view_format->id == view_format->typeless_id)
{
WARN("Trying to create view for typeless format %s.\n", debug_d3dformat(view_format->id));
return E_FAIL;
return E_INVALIDARG;
}
view->refcount = 1;
@ -302,7 +302,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_
|| desc->u.texture.level_count > texture->level_count - desc->u.texture.level_idx
|| desc->u.texture.layer_idx >= texture->layer_count
|| desc->u.texture.layer_count > texture->layer_count - desc->u.texture.layer_idx)
return E_FAIL;
return E_INVALIDARG;
view->target = texture->target;
for (i = 0; i < ARRAY_SIZE(view_types); ++i)