Diligent Engine API Reference: D:/GitHub/DiligentEngine/DiligentCore/Graphics/GraphicsEngineD3D11/include/D3D11TypeDefinitions.h Source File

Diligent Engine API Reference

D3D11TypeDefinitions.h
1 /* Copyright 2015-2018 Egor Yusov
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
11 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF ANY PROPRIETARY RIGHTS.
12 *
13 * In no event and under no legal theory, whether in tort (including negligence),
14 * contract, or otherwise, unless required by applicable law (such as deliberate
15 * and grossly negligent acts) or agreed to in writing, shall any Contributor be
16 * liable for any damages, including any direct, indirect, special, incidental,
17 * or consequential damages of any character arising as a result of this License or
18 * out of the use or inability to use the software (including but not limited to damages
19 * for loss of goodwill, work stoppage, computer failure or malfunction, or any and
20 * all other commercial damages or losses), even if such Contributor has been advised
21 * of the possibility of such damages.
22 */
23
24 #pragma once
25
28
29 // Filters
30 #define D3D_FILTER_MIN_MAG_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
31 #define D3D_FILTER_MIN_MAG_POINT_MIP_LINEAR D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR
32 #define D3D_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT
33 #define D3D_FILTER_MIN_POINT_MAG_MIP_LINEAR D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR
34 #define D3D_FILTER_MIN_LINEAR_MAG_MIP_POINT D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT
35 #define D3D_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR
36 #define D3D_FILTER_MIN_MAG_LINEAR_MIP_POINT D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT
37 #define D3D_FILTER_MIN_MAG_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_LINEAR
38 #define D3D_FILTER_ANISOTROPIC D3D11_FILTER_ANISOTROPIC
39
40 #define D3D_FILTER_COMPARISON_MIN_MAG_MIP_POINT D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT
41 #define D3D_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR
42 #define D3D_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT
43 #define D3D_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR
44 #define D3D_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT
45 #define D3D_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR
46 #define D3D_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT
47 #define D3D_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR
48 #define D3D_FILTER_COMPARISON_ANISOTROPIC D3D11_FILTER_COMPARISON_ANISOTROPIC
49
50 // Minimum/maximum filtering is not supported in d3d11
51 #define D3D_FILTER_MINIMUM_MIN_MAG_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
52 #define D3D_FILTER_MINIMUM_MIN_MAG_POINT_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
53 #define D3D_FILTER_MINIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
54 #define D3D_FILTER_MINIMUM_MIN_POINT_MAG_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
55 #define D3D_FILTER_MINIMUM_MIN_LINEAR_MAG_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
56 #define D3D_FILTER_MINIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
57 #define D3D_FILTER_MINIMUM_MIN_MAG_LINEAR_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
58 #define D3D_FILTER_MINIMUM_MIN_MAG_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
59 #define D3D_FILTER_MINIMUM_ANISOTROPIC D3D11_FILTER_MIN_MAG_MIP_POINT
60
61 #define D3D_FILTER_MAXIMUM_MIN_MAG_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
62 #define D3D_FILTER_MAXIMUM_MIN_MAG_POINT_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
63 #define D3D_FILTER_MAXIMUM_MIN_POINT_MAG_LINEAR_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
64 #define D3D_FILTER_MAXIMUM_MIN_POINT_MAG_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
65 #define D3D_FILTER_MAXIMUM_MIN_LINEAR_MAG_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
66 #define D3D_FILTER_MAXIMUM_MIN_LINEAR_MAG_POINT_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
67 #define D3D_FILTER_MAXIMUM_MIN_MAG_LINEAR_MIP_POINT D3D11_FILTER_MIN_MAG_MIP_POINT
68 #define D3D_FILTER_MAXIMUM_MIN_MAG_MIP_LINEAR D3D11_FILTER_MIN_MAG_MIP_POINT
69 #define D3D_FILTER_MAXIMUM_ANISOTROPIC D3D11_FILTER_MIN_MAG_MIP_POINT
70
71
72 // Comparison functions
73 #define D3D_COMPARISON_FUNC_NEVER D3D11_COMPARISON_NEVER
74 #define D3D_COMPARISON_FUNC_LESS D3D11_COMPARISON_LESS
75 #define D3D_COMPARISON_FUNC_EQUAL D3D11_COMPARISON_EQUAL
76 #define D3D_COMPARISON_FUNC_LESS_EQUAL D3D11_COMPARISON_LESS_EQUAL
77 #define D3D_COMPARISON_FUNC_GREATER D3D11_COMPARISON_GREATER
78 #define D3D_COMPARISON_FUNC_NOT_EQUAL D3D11_COMPARISON_NOT_EQUAL
79 #define D3D_COMPARISON_FUNC_GREATER_EQUAL D3D11_COMPARISON_GREATER_EQUAL
80 #define D3D_COMPARISON_FUNC_ALWAYS D3D11_COMPARISON_ALWAYS
81
82 // Stencil operations
83 #define D3D_STENCIL_OP_KEEP D3D11_STENCIL_OP_KEEP
84 #define D3D_STENCIL_OP_ZERO D3D11_STENCIL_OP_ZERO
85 #define D3D_STENCIL_OP_REPLACE D3D11_STENCIL_OP_REPLACE
86 #define D3D_STENCIL_OP_INCR_SAT D3D11_STENCIL_OP_INCR_SAT
87 #define D3D_STENCIL_OP_DECR_SAT D3D11_STENCIL_OP_DECR_SAT
88 #define D3D_STENCIL_OP_INVERT D3D11_STENCIL_OP_INVERT
89 #define D3D_STENCIL_OP_INCR D3D11_STENCIL_OP_INCR
90 #define D3D_STENCIL_OP_DECR D3D11_STENCIL_OP_DECR
91
92 // Depth write masks
93 #define D3D_DEPTH_WRITE_MASK_ALL D3D11_DEPTH_WRITE_MASK_ALL
94 #define D3D_DEPTH_WRITE_MASK_ZERO D3D11_DEPTH_WRITE_MASK_ZERO
95
96 // Cull modes
97 #define D3D_CULL_MODE_NONE D3D11_CULL_NONE
98 #define D3D_CULL_MODE_FRONT D3D11_CULL_FRONT
99 #define D3D_CULL_MODE_BACK D3D11_CULL_BACK
100
101 // Fill modes
102 #define D3D_FILL_MODE_WIREFRAME D3D11_FILL_WIREFRAME
103 #define D3D_FILL_MODE_SOLID D3D11_FILL_SOLID
104
105 // Blend sources
106 #define D3D_BLEND_ZERO D3D11_BLEND_ZERO
107 #define D3D_BLEND_ONE D3D11_BLEND_ONE
108 #define D3D_BLEND_SRC_COLOR D3D11_BLEND_SRC_COLOR
109 #define D3D_BLEND_INV_SRC_COLOR D3D11_BLEND_INV_SRC_COLOR
110 #define D3D_BLEND_SRC_ALPHA D3D11_BLEND_SRC_ALPHA
111 #define D3D_BLEND_INV_SRC_ALPHA D3D11_BLEND_INV_SRC_ALPHA
112 #define D3D_BLEND_DEST_ALPHA D3D11_BLEND_DEST_ALPHA
113 #define D3D_BLEND_INV_DEST_ALPHA D3D11_BLEND_INV_DEST_ALPHA
114 #define D3D_BLEND_DEST_COLOR D3D11_BLEND_DEST_COLOR
115 #define D3D_BLEND_INV_DEST_COLOR D3D11_BLEND_INV_DEST_COLOR
116 #define D3D_BLEND_SRC_ALPHA_SAT D3D11_BLEND_SRC_ALPHA_SAT
117 #define D3D_BLEND_BLEND_FACTOR D3D11_BLEND_BLEND_FACTOR
118 #define D3D_BLEND_INV_BLEND_FACTOR D3D11_BLEND_INV_BLEND_FACTOR
119 #define D3D_BLEND_SRC1_COLOR D3D11_BLEND_SRC1_COLOR
120 #define D3D_BLEND_INV_SRC1_COLOR D3D11_BLEND_INV_SRC1_COLOR
121 #define D3D_BLEND_SRC1_ALPHA D3D11_BLEND_SRC1_ALPHA
122 #define D3D_BLEND_INV_SRC1_ALPHA D3D11_BLEND_INV_SRC1_ALPHA
123
124 // Blend operations
125 #define D3D_BLEND_OP_ADD D3D11_BLEND_OP_ADD
126 #define D3D_BLEND_OP_SUBTRACT D3D11_BLEND_OP_SUBTRACT
127 #define D3D_BLEND_OP_REV_SUBTRACT D3D11_BLEND_OP_REV_SUBTRACT
128 #define D3D_BLEND_OP_MIN D3D11_BLEND_OP_MIN
129 #define D3D_BLEND_OP_MAX D3D11_BLEND_OP_MAX
130
131 // Color masks
132 #define D3D_COLOR_WRITE_ENABLE_RED D3D11_COLOR_WRITE_ENABLE_RED
133 #define D3D_COLOR_WRITE_ENABLE_GREEN D3D11_COLOR_WRITE_ENABLE_GREEN
134 #define D3D_COLOR_WRITE_ENABLE_BLUE D3D11_COLOR_WRITE_ENABLE_BLUE
135 #define D3D_COLOR_WRITE_ENABLE_ALPHA D3D11_COLOR_WRITE_ENABLE_ALPHA
136
137 // Input classification
138 #define D3D_INPUT_CLASSIFICATION_PER_VERTEX_DATA D3D11_INPUT_PER_VERTEX_DATA
139 #define D3D_INPUT_CLASSIFICATION_PER_INSTANCE_DATA D3D11_INPUT_PER_INSTANCE_DATA
140
141 // Texture address modes
142 #define D3D_TEXTURE_ADDRESS_WRAP D3D11_TEXTURE_ADDRESS_WRAP
143 #define D3D_TEXTURE_ADDRESS_MIRROR D3D11_TEXTURE_ADDRESS_MIRROR
144 #define D3D_TEXTURE_ADDRESS_CLAMP D3D11_TEXTURE_ADDRESS_CLAMP
145 #define D3D_TEXTURE_ADDRESS_BORDER D3D11_TEXTURE_ADDRESS_BORDER
146 #define D3D_TEXTURE_ADDRESS_MIRROR_ONCE D3D11_TEXTURE_ADDRESS_MIRROR_ONCE
147
148
149 // SRV Dimensions
150 // d3d11.h aliases D3D11_SRV_DIMENSION as D3D_SRV_DIMENSION, so there is no
151 // need to redefine this enum
152
153 // RTV Dimensions
154 #define D3D_RTV_DIMENSION_UNKNOWN D3D11_RTV_DIMENSION_UNKNOWN
155 #define D3D_RTV_DIMENSION_BUFFER D3D11_RTV_DIMENSION_BUFFER
156 #define D3D_RTV_DIMENSION_TEXTURE1D D3D11_RTV_DIMENSION_TEXTURE1D
157 #define D3D_RTV_DIMENSION_TEXTURE1DARRAY D3D11_RTV_DIMENSION_TEXTURE1DARRAY
158 #define D3D_RTV_DIMENSION_TEXTURE2D D3D11_RTV_DIMENSION_TEXTURE2D
159 #define D3D_RTV_DIMENSION_TEXTURE2DARRAY D3D11_RTV_DIMENSION_TEXTURE2DARRAY
160 #define D3D_RTV_DIMENSION_TEXTURE2DMS D3D11_RTV_DIMENSION_TEXTURE2DMS
161 #define D3D_RTV_DIMENSION_TEXTURE2DMSARRAY D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY
162 #define D3D_RTV_DIMENSION_TEXTURE3D D3D11_RTV_DIMENSION_TEXTURE3D
163
164
165 // DSV Dimensions
166 #define D3D_DSV_DIMENSION_UNKNOWN D3D11_DSV_DIMENSION_UNKNOWN
167 #define D3D_DSV_DIMENSION_TEXTURE1D D3D11_DSV_DIMENSION_TEXTURE1D
168 #define D3D_DSV_DIMENSION_TEXTURE1DARRAY D3D11_DSV_DIMENSION_TEXTURE1DARRAY
169 #define D3D_DSV_DIMENSION_TEXTURE2D D3D11_DSV_DIMENSION_TEXTURE2D
170 #define D3D_DSV_DIMENSION_TEXTURE2DARRAY D3D11_DSV_DIMENSION_TEXTURE2DARRAY
171 #define D3D_DSV_DIMENSION_TEXTURE2DMS D3D11_DSV_DIMENSION_TEXTURE2DMS
172 #define D3D_DSV_DIMENSION_TEXTURE2DMSARRAY D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY
173
174 // UAV Dimensions
175 #define D3D_UAV_DIMENSION_UNKNOWN D3D11_UAV_DIMENSION_UNKNOWN
176 #define D3D_UAV_DIMENSION_BUFFER D3D11_UAV_DIMENSION_BUFFER
177 #define D3D_UAV_DIMENSION_TEXTURE1D D3D11_UAV_DIMENSION_TEXTURE1D
178 #define D3D_UAV_DIMENSION_TEXTURE1DARRAY D3D11_UAV_DIMENSION_TEXTURE1DARRAY
179 #define D3D_UAV_DIMENSION_TEXTURE2D D3D11_UAV_DIMENSION_TEXTURE2D
180 #define D3D_UAV_DIMENSION_TEXTURE2DARRAY D3D11_UAV_DIMENSION_TEXTURE2DARRAY
181 #define D3D_UAV_DIMENSION_TEXTURE3D D3D11_UAV_DIMENSION_TEXTURE3D