ReactOS 0.4.17-dev-934-g091855f
error.c
Go to the documentation of this file.
1/*
2 * Copyright 2018 Józef Kucia for CodeWeavers
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19#include "vkd3d_common.h"
20
22{
23 switch (vkd3d_result)
24 {
25 case VKD3D_OK:
26 return S_OK;
28 WARN("Invalid shader.\n");
29 /* fall-through */
30 case VKD3D_ERROR:
31 return E_FAIL;
33 return E_OUTOFMEMORY;
35 return E_INVALIDARG;
37 return E_NOTIMPL;
44 default:
45 FIXME("Unhandled vkd3d result %d.\n", vkd3d_result);
46 return E_FAIL;
47 }
48}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define S_OK
Definition: intsafe.h:52
HRESULT hresult_from_vkd3d_result(int vkd3d_result)
Definition: error.c:21
vkd3d_result
Definition: vkd3d_types.h:41
@ VKD3D_ERROR_INVALID_ARGUMENT
Definition: vkd3d_types.h:51
@ VKD3D_ERROR_NOT_IMPLEMENTED
Definition: vkd3d_types.h:55
@ VKD3D_ERROR_KEY_ALREADY_EXISTS
Definition: vkd3d_types.h:57
@ VKD3D_ERROR_INVALID_SHADER
Definition: vkd3d_types.h:53
@ VKD3D_ERROR_MORE_DATA
Definition: vkd3d_types.h:61
@ VKD3D_ERROR
Definition: vkd3d_types.h:47
@ VKD3D_OK
Definition: vkd3d_types.h:43
@ VKD3D_ERROR_OUT_OF_MEMORY
Definition: vkd3d_types.h:49
@ VKD3D_ERROR_NOT_FOUND
Definition: vkd3d_types.h:59
#define DXGI_ERROR_NOT_FOUND
Definition: winerror.h:7122
#define DXGI_ERROR_MORE_DATA
Definition: winerror.h:7123
#define DXGI_ERROR_ALREADY_EXISTS
Definition: winerror.h:7160