mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
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:
parent
e9b33183cf
commit
6bcee19960
@ -423,12 +423,14 @@ HRESULT hresult_from_vkd3d_result(int vkd3d_result)
|
|||||||
{
|
{
|
||||||
case VKD3D_OK:
|
case VKD3D_OK:
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
case VKD3D_ERROR_INVALID_SHADER:
|
||||||
|
WARN("Invalid shader bytecode.\n");
|
||||||
|
/* fall-through */
|
||||||
case VKD3D_ERROR:
|
case VKD3D_ERROR:
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
case VKD3D_ERROR_OUT_OF_MEMORY:
|
case VKD3D_ERROR_OUT_OF_MEMORY:
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
case VKD3D_ERROR_INVALID_ARGUMENT:
|
case VKD3D_ERROR_INVALID_ARGUMENT:
|
||||||
case VKD3D_ERROR_INVALID_SHADER:
|
|
||||||
return E_INVALIDARG;
|
return E_INVALIDARG;
|
||||||
case VKD3D_ERROR_NOT_IMPLEMENTED:
|
case VKD3D_ERROR_NOT_IMPLEMENTED:
|
||||||
return E_NOTIMPL;
|
return E_NOTIMPL;
|
||||||
|
Loading…
Reference in New Issue
Block a user