2 * Copyright 2008 Henri Verbeet for CodeWeavers
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.
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.
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
21 #include "wine/port.h"
23 #include "dxgi_private.h"
25 WINE_DEFAULT_DEBUG_CHANNEL(dxgi);
27 #define WINE_DXGI_TO_STR(x) case x: return #x
29 const char *debug_dxgi_format(DXGI_FORMAT format)
33 WINE_DXGI_TO_STR(DXGI_FORMAT_UNKNOWN);
34 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32A32_TYPELESS);
35 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32A32_FLOAT);
36 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32A32_UINT);
37 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32A32_SINT);
38 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32_TYPELESS);
39 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32_FLOAT);
40 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32_UINT);
41 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32B32_SINT);
42 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16B16A16_TYPELESS);
43 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16B16A16_FLOAT);
44 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16B16A16_UNORM);
45 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16B16A16_UINT);
46 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16B16A16_SNORM);
47 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16B16A16_SINT);
48 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32_TYPELESS);
49 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32_FLOAT);
50 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32_UINT);
51 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G32_SINT);
52 WINE_DXGI_TO_STR(DXGI_FORMAT_R32G8X24_TYPELESS);
53 WINE_DXGI_TO_STR(DXGI_FORMAT_D32_FLOAT_S8X24_UINT);
54 WINE_DXGI_TO_STR(DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS);
55 WINE_DXGI_TO_STR(DXGI_FORMAT_X32_TYPELESS_G8X24_UINT);
56 WINE_DXGI_TO_STR(DXGI_FORMAT_R10G10B10A2_TYPELESS);
57 WINE_DXGI_TO_STR(DXGI_FORMAT_R10G10B10A2_UNORM);
58 WINE_DXGI_TO_STR(DXGI_FORMAT_R10G10B10A2_UINT);
59 WINE_DXGI_TO_STR(DXGI_FORMAT_R11G11B10_FLOAT);
60 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8B8A8_TYPELESS);
61 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8B8A8_UNORM);
62 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8B8A8_UNORM_SRGB);
63 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8B8A8_UINT);
64 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8B8A8_SNORM);
65 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8B8A8_SINT);
66 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16_TYPELESS);
67 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16_FLOAT);
68 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16_UNORM);
69 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16_UINT);
70 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16_SNORM);
71 WINE_DXGI_TO_STR(DXGI_FORMAT_R16G16_SINT);
72 WINE_DXGI_TO_STR(DXGI_FORMAT_R32_TYPELESS);
73 WINE_DXGI_TO_STR(DXGI_FORMAT_D32_FLOAT);
74 WINE_DXGI_TO_STR(DXGI_FORMAT_R32_FLOAT);
75 WINE_DXGI_TO_STR(DXGI_FORMAT_R32_UINT);
76 WINE_DXGI_TO_STR(DXGI_FORMAT_R32_SINT);
77 WINE_DXGI_TO_STR(DXGI_FORMAT_R24G8_TYPELESS);
78 WINE_DXGI_TO_STR(DXGI_FORMAT_D24_UNORM_S8_UINT);
79 WINE_DXGI_TO_STR(DXGI_FORMAT_R24_UNORM_X8_TYPELESS);
80 WINE_DXGI_TO_STR(DXGI_FORMAT_X24_TYPELESS_G8_UINT);
81 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8_TYPELESS);
82 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8_UNORM);
83 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8_UINT);
84 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8_SNORM);
85 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8_SINT);
86 WINE_DXGI_TO_STR(DXGI_FORMAT_R16_TYPELESS);
87 WINE_DXGI_TO_STR(DXGI_FORMAT_R16_FLOAT);
88 WINE_DXGI_TO_STR(DXGI_FORMAT_D16_UNORM);
89 WINE_DXGI_TO_STR(DXGI_FORMAT_R16_UNORM);
90 WINE_DXGI_TO_STR(DXGI_FORMAT_R16_UINT);
91 WINE_DXGI_TO_STR(DXGI_FORMAT_R16_SNORM);
92 WINE_DXGI_TO_STR(DXGI_FORMAT_R16_SINT);
93 WINE_DXGI_TO_STR(DXGI_FORMAT_R8_TYPELESS);
94 WINE_DXGI_TO_STR(DXGI_FORMAT_R8_UNORM);
95 WINE_DXGI_TO_STR(DXGI_FORMAT_R8_UINT);
96 WINE_DXGI_TO_STR(DXGI_FORMAT_R8_SNORM);
97 WINE_DXGI_TO_STR(DXGI_FORMAT_R8_SINT);
98 WINE_DXGI_TO_STR(DXGI_FORMAT_A8_UNORM);
99 WINE_DXGI_TO_STR(DXGI_FORMAT_R1_UNORM);
100 WINE_DXGI_TO_STR(DXGI_FORMAT_R9G9B9E5_SHAREDEXP);
101 WINE_DXGI_TO_STR(DXGI_FORMAT_R8G8_B8G8_UNORM);
102 WINE_DXGI_TO_STR(DXGI_FORMAT_G8R8_G8B8_UNORM);
103 WINE_DXGI_TO_STR(DXGI_FORMAT_BC1_TYPELESS);
104 WINE_DXGI_TO_STR(DXGI_FORMAT_BC1_UNORM);
105 WINE_DXGI_TO_STR(DXGI_FORMAT_BC1_UNORM_SRGB);
106 WINE_DXGI_TO_STR(DXGI_FORMAT_BC2_TYPELESS);
107 WINE_DXGI_TO_STR(DXGI_FORMAT_BC2_UNORM);
108 WINE_DXGI_TO_STR(DXGI_FORMAT_BC2_UNORM_SRGB);
109 WINE_DXGI_TO_STR(DXGI_FORMAT_BC3_TYPELESS);
110 WINE_DXGI_TO_STR(DXGI_FORMAT_BC3_UNORM);
111 WINE_DXGI_TO_STR(DXGI_FORMAT_BC3_UNORM_SRGB);
112 WINE_DXGI_TO_STR(DXGI_FORMAT_BC4_TYPELESS);
113 WINE_DXGI_TO_STR(DXGI_FORMAT_BC4_UNORM);
114 WINE_DXGI_TO_STR(DXGI_FORMAT_BC4_SNORM);
115 WINE_DXGI_TO_STR(DXGI_FORMAT_BC5_TYPELESS);
116 WINE_DXGI_TO_STR(DXGI_FORMAT_BC5_UNORM);
117 WINE_DXGI_TO_STR(DXGI_FORMAT_BC5_SNORM);
118 WINE_DXGI_TO_STR(DXGI_FORMAT_B5G6R5_UNORM);
119 WINE_DXGI_TO_STR(DXGI_FORMAT_B5G5R5A1_UNORM);
120 WINE_DXGI_TO_STR(DXGI_FORMAT_B8G8R8A8_UNORM);
121 WINE_DXGI_TO_STR(DXGI_FORMAT_B8G8R8X8_UNORM);
123 FIXME("Unrecognized DXGI_FORMAT %#x\n", format);
124 return "unrecognized";
128 #undef WINE_DXGI_TO_STR