2020-09-28 20:41:04 -07:00
|
|
|
/*
|
|
|
|
* Copyright 2018 Józef Kucia for CodeWeavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "vkd3d_common.h"
|
|
|
|
|
|
|
|
HRESULT hresult_from_vkd3d_result(int vkd3d_result)
|
|
|
|
{
|
|
|
|
switch (vkd3d_result)
|
|
|
|
{
|
|
|
|
case VKD3D_OK:
|
|
|
|
return S_OK;
|
|
|
|
case VKD3D_ERROR_INVALID_SHADER:
|
2022-08-29 12:31:01 -07:00
|
|
|
WARN("Invalid shader.\n");
|
2020-09-28 20:41:04 -07:00
|
|
|
/* fall-through */
|
|
|
|
case VKD3D_ERROR:
|
|
|
|
return E_FAIL;
|
|
|
|
case VKD3D_ERROR_OUT_OF_MEMORY:
|
|
|
|
return E_OUTOFMEMORY;
|
|
|
|
case VKD3D_ERROR_INVALID_ARGUMENT:
|
|
|
|
return E_INVALIDARG;
|
|
|
|
case VKD3D_ERROR_NOT_IMPLEMENTED:
|
|
|
|
return E_NOTIMPL;
|
|
|
|
default:
|
|
|
|
FIXME("Unhandled vkd3d result %d.\n", vkd3d_result);
|
|
|
|
return E_FAIL;
|
|
|
|
}
|
|
|
|
}
|