vkd3d: Return E_FAIL for invalid shader bytecode.

On Windows invalid shader bytecode leads to a crash, E_FAIL or
E_OUTOFMEMORY error.

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 2018-12-11 15:48:03 +01:00 committed by Alexandre Julliard
parent e9b33183cf
commit 6bcee19960

View File

@ -423,12 +423,14 @@ HRESULT hresult_from_vkd3d_result(int vkd3d_result)
{
case VKD3D_OK:
return S_OK;
case VKD3D_ERROR_INVALID_SHADER:
WARN("Invalid shader bytecode.\n");
/* fall-through */
case VKD3D_ERROR:
return E_FAIL;
case VKD3D_ERROR_OUT_OF_MEMORY:
return E_OUTOFMEMORY;
case VKD3D_ERROR_INVALID_ARGUMENT:
case VKD3D_ERROR_INVALID_SHADER:
return E_INVALIDARG;
case VKD3D_ERROR_NOT_IMPLEMENTED:
return E_NOTIMPL;