José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1 | ########################################################################## |
| 2 | # |
| 3 | # Copyright 2012 Jose Fonseca |
| 4 | # All Rights Reserved. |
| 5 | # |
| 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy |
| 7 | # of this software and associated documentation files (the "Software"), to deal |
| 8 | # in the Software without restriction, including without limitation the rights |
| 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| 10 | # copies of the Software, and to permit persons to whom the Software is |
| 11 | # furnished to do so, subject to the following conditions: |
| 12 | # |
| 13 | # The above copyright notice and this permission notice shall be included in |
| 14 | # all copies or substantial portions of the Software. |
| 15 | # |
| 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| 22 | # THE SOFTWARE. |
| 23 | # |
| 24 | ##########################################################################/ |
| 25 | |
| 26 | |
| 27 | from dxgi import * |
| 28 | from d3dcommon import * |
| 29 | from d3d11sdklayers import * |
| 30 | |
| 31 | |
José Fonseca | 73841ad | 2012-04-16 20:47:56 +0100 | [diff] [blame] | 32 | HRESULT = MAKE_HRESULT([ |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 33 | "D3D11_ERROR_FILE_NOT_FOUND", |
| 34 | "D3D11_ERROR_TOO_MANY_UNIQUE_STATE_OBJECTS", |
| 35 | "D3D11_ERROR_TOO_MANY_UNIQUE_VIEW_OBJECTS", |
| 36 | "D3D11_ERROR_DEFERRED_CONTEXT_MAP_WITHOUT_INITIAL_DISCARD", |
| 37 | "D3DERR_INVALIDCALL", |
| 38 | "D3DERR_WASSTILLDRAWING", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 39 | ]) |
| 40 | |
| 41 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 42 | ID3D11DepthStencilState = Interface("ID3D11DepthStencilState", ID3D11DeviceChild) |
| 43 | ID3D11BlendState = Interface("ID3D11BlendState", ID3D11DeviceChild) |
| 44 | ID3D11RasterizerState = Interface("ID3D11RasterizerState", ID3D11DeviceChild) |
| 45 | ID3D11Resource = Interface("ID3D11Resource", ID3D11DeviceChild) |
| 46 | ID3D11Buffer = Interface("ID3D11Buffer", ID3D11Resource) |
| 47 | ID3D11Texture1D = Interface("ID3D11Texture1D", ID3D11Resource) |
| 48 | ID3D11Texture2D = Interface("ID3D11Texture2D", ID3D11Resource) |
| 49 | ID3D11Texture3D = Interface("ID3D11Texture3D", ID3D11Resource) |
| 50 | ID3D11View = Interface("ID3D11View", ID3D11DeviceChild) |
| 51 | ID3D11ShaderResourceView = Interface("ID3D11ShaderResourceView", ID3D11View) |
| 52 | ID3D11RenderTargetView = Interface("ID3D11RenderTargetView", ID3D11View) |
| 53 | ID3D11DepthStencilView = Interface("ID3D11DepthStencilView", ID3D11View) |
| 54 | ID3D11UnorderedAccessView = Interface("ID3D11UnorderedAccessView", ID3D11View) |
| 55 | ID3D11VertexShader = Interface("ID3D11VertexShader", ID3D11DeviceChild) |
| 56 | ID3D11HullShader = Interface("ID3D11HullShader", ID3D11DeviceChild) |
| 57 | ID3D11DomainShader = Interface("ID3D11DomainShader", ID3D11DeviceChild) |
| 58 | ID3D11GeometryShader = Interface("ID3D11GeometryShader", ID3D11DeviceChild) |
| 59 | ID3D11PixelShader = Interface("ID3D11PixelShader", ID3D11DeviceChild) |
| 60 | ID3D11ComputeShader = Interface("ID3D11ComputeShader", ID3D11DeviceChild) |
| 61 | ID3D11InputLayout = Interface("ID3D11InputLayout", ID3D11DeviceChild) |
| 62 | ID3D11SamplerState = Interface("ID3D11SamplerState", ID3D11DeviceChild) |
| 63 | ID3D11Asynchronous = Interface("ID3D11Asynchronous", ID3D11DeviceChild) |
| 64 | ID3D11Query = Interface("ID3D11Query", ID3D11Asynchronous) |
| 65 | ID3D11Predicate = Interface("ID3D11Predicate", ID3D11Query) |
| 66 | ID3D11Counter = Interface("ID3D11Counter", ID3D11Asynchronous) |
| 67 | ID3D11ClassInstance = Interface("ID3D11ClassInstance", ID3D11DeviceChild) |
| 68 | ID3D11ClassLinkage = Interface("ID3D11ClassLinkage", ID3D11DeviceChild) |
| 69 | ID3D11CommandList = Interface("ID3D11CommandList", ID3D11DeviceChild) |
| 70 | ID3D11Device = Interface("ID3D11Device", IUnknown) |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 71 | |
| 72 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 73 | D3D11_INPUT_CLASSIFICATION = Enum("D3D11_INPUT_CLASSIFICATION", [ |
| 74 | "D3D11_INPUT_PER_VERTEX_DATA", |
| 75 | "D3D11_INPUT_PER_INSTANCE_DATA", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 76 | ]) |
| 77 | |
| 78 | D3D11_INPUT_ELEMENT_ALIGNED_BYTE_OFFSET = FakeEnum(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 79 | "D3D11_APPEND_ALIGNED_ELEMENT", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 80 | ]) |
| 81 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 82 | D3D11_INPUT_ELEMENT_DESC = Struct("D3D11_INPUT_ELEMENT_DESC", [ |
| 83 | (LPCSTR, "SemanticName"), |
| 84 | (UINT, "SemanticIndex"), |
| 85 | (DXGI_FORMAT, "Format"), |
| 86 | (UINT, "InputSlot"), |
| 87 | (D3D11_INPUT_ELEMENT_ALIGNED_BYTE_OFFSET, "AlignedByteOffset"), |
| 88 | (D3D11_INPUT_CLASSIFICATION, "InputSlotClass"), |
| 89 | (UINT, "InstanceDataStepRate"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 90 | ]) |
| 91 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 92 | D3D11_FILL_MODE = Enum("D3D11_FILL_MODE", [ |
| 93 | "D3D11_FILL_WIREFRAME", |
| 94 | "D3D11_FILL_SOLID", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 95 | ]) |
| 96 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 97 | D3D11_PRIMITIVE_TOPOLOGY = Enum("D3D11_PRIMITIVE_TOPOLOGY", [ |
| 98 | "D3D11_PRIMITIVE_TOPOLOGY_UNDEFINED", |
| 99 | "D3D11_PRIMITIVE_TOPOLOGY_POINTLIST", |
| 100 | "D3D11_PRIMITIVE_TOPOLOGY_LINELIST", |
| 101 | "D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP", |
| 102 | "D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST", |
| 103 | "D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP", |
| 104 | "D3D11_PRIMITIVE_TOPOLOGY_LINELIST_ADJ", |
| 105 | "D3D11_PRIMITIVE_TOPOLOGY_LINESTRIP_ADJ", |
| 106 | "D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST_ADJ", |
| 107 | "D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP_ADJ", |
| 108 | "D3D11_PRIMITIVE_TOPOLOGY_1_CONTROL_POINT_PATCHLIST", |
| 109 | "D3D11_PRIMITIVE_TOPOLOGY_2_CONTROL_POINT_PATCHLIST", |
| 110 | "D3D11_PRIMITIVE_TOPOLOGY_3_CONTROL_POINT_PATCHLIST", |
| 111 | "D3D11_PRIMITIVE_TOPOLOGY_4_CONTROL_POINT_PATCHLIST", |
| 112 | "D3D11_PRIMITIVE_TOPOLOGY_5_CONTROL_POINT_PATCHLIST", |
| 113 | "D3D11_PRIMITIVE_TOPOLOGY_6_CONTROL_POINT_PATCHLIST", |
| 114 | "D3D11_PRIMITIVE_TOPOLOGY_7_CONTROL_POINT_PATCHLIST", |
| 115 | "D3D11_PRIMITIVE_TOPOLOGY_8_CONTROL_POINT_PATCHLIST", |
| 116 | "D3D11_PRIMITIVE_TOPOLOGY_9_CONTROL_POINT_PATCHLIST", |
| 117 | "D3D11_PRIMITIVE_TOPOLOGY_10_CONTROL_POINT_PATCHLIST", |
| 118 | "D3D11_PRIMITIVE_TOPOLOGY_11_CONTROL_POINT_PATCHLIST", |
| 119 | "D3D11_PRIMITIVE_TOPOLOGY_12_CONTROL_POINT_PATCHLIST", |
| 120 | "D3D11_PRIMITIVE_TOPOLOGY_13_CONTROL_POINT_PATCHLIST", |
| 121 | "D3D11_PRIMITIVE_TOPOLOGY_14_CONTROL_POINT_PATCHLIST", |
| 122 | "D3D11_PRIMITIVE_TOPOLOGY_15_CONTROL_POINT_PATCHLIST", |
| 123 | "D3D11_PRIMITIVE_TOPOLOGY_16_CONTROL_POINT_PATCHLIST", |
| 124 | "D3D11_PRIMITIVE_TOPOLOGY_17_CONTROL_POINT_PATCHLIST", |
| 125 | "D3D11_PRIMITIVE_TOPOLOGY_18_CONTROL_POINT_PATCHLIST", |
| 126 | "D3D11_PRIMITIVE_TOPOLOGY_19_CONTROL_POINT_PATCHLIST", |
| 127 | "D3D11_PRIMITIVE_TOPOLOGY_20_CONTROL_POINT_PATCHLIST", |
| 128 | "D3D11_PRIMITIVE_TOPOLOGY_21_CONTROL_POINT_PATCHLIST", |
| 129 | "D3D11_PRIMITIVE_TOPOLOGY_22_CONTROL_POINT_PATCHLIST", |
| 130 | "D3D11_PRIMITIVE_TOPOLOGY_23_CONTROL_POINT_PATCHLIST", |
| 131 | "D3D11_PRIMITIVE_TOPOLOGY_24_CONTROL_POINT_PATCHLIST", |
| 132 | "D3D11_PRIMITIVE_TOPOLOGY_25_CONTROL_POINT_PATCHLIST", |
| 133 | "D3D11_PRIMITIVE_TOPOLOGY_26_CONTROL_POINT_PATCHLIST", |
| 134 | "D3D11_PRIMITIVE_TOPOLOGY_27_CONTROL_POINT_PATCHLIST", |
| 135 | "D3D11_PRIMITIVE_TOPOLOGY_28_CONTROL_POINT_PATCHLIST", |
| 136 | "D3D11_PRIMITIVE_TOPOLOGY_29_CONTROL_POINT_PATCHLIST", |
| 137 | "D3D11_PRIMITIVE_TOPOLOGY_30_CONTROL_POINT_PATCHLIST", |
| 138 | "D3D11_PRIMITIVE_TOPOLOGY_31_CONTROL_POINT_PATCHLIST", |
| 139 | "D3D11_PRIMITIVE_TOPOLOGY_32_CONTROL_POINT_PATCHLIST", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 140 | ]) |
| 141 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 142 | D3D11_PRIMITIVE = Enum("D3D11_PRIMITIVE", [ |
| 143 | "D3D11_PRIMITIVE_UNDEFINED", |
| 144 | "D3D11_PRIMITIVE_POINT", |
| 145 | "D3D11_PRIMITIVE_LINE", |
| 146 | "D3D11_PRIMITIVE_TRIANGLE", |
| 147 | "D3D11_PRIMITIVE_LINE_ADJ", |
| 148 | "D3D11_PRIMITIVE_TRIANGLE_ADJ", |
| 149 | "D3D11_PRIMITIVE_1_CONTROL_POINT_PATCH", |
| 150 | "D3D11_PRIMITIVE_2_CONTROL_POINT_PATCH", |
| 151 | "D3D11_PRIMITIVE_3_CONTROL_POINT_PATCH", |
| 152 | "D3D11_PRIMITIVE_4_CONTROL_POINT_PATCH", |
| 153 | "D3D11_PRIMITIVE_5_CONTROL_POINT_PATCH", |
| 154 | "D3D11_PRIMITIVE_6_CONTROL_POINT_PATCH", |
| 155 | "D3D11_PRIMITIVE_7_CONTROL_POINT_PATCH", |
| 156 | "D3D11_PRIMITIVE_8_CONTROL_POINT_PATCH", |
| 157 | "D3D11_PRIMITIVE_9_CONTROL_POINT_PATCH", |
| 158 | "D3D11_PRIMITIVE_10_CONTROL_POINT_PATCH", |
| 159 | "D3D11_PRIMITIVE_11_CONTROL_POINT_PATCH", |
| 160 | "D3D11_PRIMITIVE_12_CONTROL_POINT_PATCH", |
| 161 | "D3D11_PRIMITIVE_13_CONTROL_POINT_PATCH", |
| 162 | "D3D11_PRIMITIVE_14_CONTROL_POINT_PATCH", |
| 163 | "D3D11_PRIMITIVE_15_CONTROL_POINT_PATCH", |
| 164 | "D3D11_PRIMITIVE_16_CONTROL_POINT_PATCH", |
| 165 | "D3D11_PRIMITIVE_17_CONTROL_POINT_PATCH", |
| 166 | "D3D11_PRIMITIVE_18_CONTROL_POINT_PATCH", |
| 167 | "D3D11_PRIMITIVE_19_CONTROL_POINT_PATCH", |
| 168 | "D3D11_PRIMITIVE_20_CONTROL_POINT_PATCH", |
| 169 | "D3D11_PRIMITIVE_21_CONTROL_POINT_PATCH", |
| 170 | "D3D11_PRIMITIVE_22_CONTROL_POINT_PATCH", |
| 171 | "D3D11_PRIMITIVE_23_CONTROL_POINT_PATCH", |
| 172 | "D3D11_PRIMITIVE_24_CONTROL_POINT_PATCH", |
| 173 | "D3D11_PRIMITIVE_25_CONTROL_POINT_PATCH", |
| 174 | "D3D11_PRIMITIVE_26_CONTROL_POINT_PATCH", |
| 175 | "D3D11_PRIMITIVE_27_CONTROL_POINT_PATCH", |
| 176 | "D3D11_PRIMITIVE_28_CONTROL_POINT_PATCH", |
| 177 | "D3D11_PRIMITIVE_29_CONTROL_POINT_PATCH", |
| 178 | "D3D11_PRIMITIVE_30_CONTROL_POINT_PATCH", |
| 179 | "D3D11_PRIMITIVE_31_CONTROL_POINT_PATCH", |
| 180 | "D3D11_PRIMITIVE_32_CONTROL_POINT_PATCH", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 181 | ]) |
| 182 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 183 | D3D11_CULL_MODE = Enum("D3D11_CULL_MODE", [ |
| 184 | "D3D11_CULL_NONE", |
| 185 | "D3D11_CULL_FRONT", |
| 186 | "D3D11_CULL_BACK", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 187 | ]) |
| 188 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 189 | D3D11_SO_DECLARATION_ENTRY = Struct("D3D11_SO_DECLARATION_ENTRY", [ |
| 190 | (UINT, "Stream"), |
| 191 | (LPCSTR, "SemanticName"), |
| 192 | (UINT, "SemanticIndex"), |
| 193 | (BYTE, "StartComponent"), |
| 194 | (BYTE, "ComponentCount"), |
| 195 | (BYTE, "OutputSlot"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 196 | ]) |
| 197 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 198 | D3D11_VIEWPORT = Struct("D3D11_VIEWPORT", [ |
| 199 | (FLOAT, "TopLeftX"), |
| 200 | (FLOAT, "TopLeftY"), |
| 201 | (FLOAT, "Width"), |
| 202 | (FLOAT, "Height"), |
| 203 | (FLOAT, "MinDepth"), |
| 204 | (FLOAT, "MaxDepth"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 205 | ]) |
| 206 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 207 | D3D11_RESOURCE_DIMENSION = Enum("D3D11_RESOURCE_DIMENSION", [ |
| 208 | "D3D11_RESOURCE_DIMENSION_UNKNOWN", |
| 209 | "D3D11_RESOURCE_DIMENSION_BUFFER", |
| 210 | "D3D11_RESOURCE_DIMENSION_TEXTURE1D", |
| 211 | "D3D11_RESOURCE_DIMENSION_TEXTURE2D", |
| 212 | "D3D11_RESOURCE_DIMENSION_TEXTURE3D", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 213 | ]) |
| 214 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 215 | D3D11_SRV_DIMENSION = Enum("D3D11_SRV_DIMENSION", [ |
| 216 | "D3D11_SRV_DIMENSION_UNKNOWN", |
| 217 | "D3D11_SRV_DIMENSION_BUFFER", |
| 218 | "D3D11_SRV_DIMENSION_TEXTURE1D", |
| 219 | "D3D11_SRV_DIMENSION_TEXTURE1DARRAY", |
| 220 | "D3D11_SRV_DIMENSION_TEXTURE2D", |
| 221 | "D3D11_SRV_DIMENSION_TEXTURE2DARRAY", |
| 222 | "D3D11_SRV_DIMENSION_TEXTURE2DMS", |
| 223 | "D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY", |
| 224 | "D3D11_SRV_DIMENSION_TEXTURE3D", |
| 225 | "D3D11_SRV_DIMENSION_TEXTURECUBE", |
| 226 | "D3D11_SRV_DIMENSION_TEXTURECUBEARRAY", |
| 227 | "D3D11_SRV_DIMENSION_BUFFEREX", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 228 | ]) |
| 229 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 230 | D3D11_DSV_DIMENSION = Enum("D3D11_DSV_DIMENSION", [ |
| 231 | "D3D11_DSV_DIMENSION_UNKNOWN", |
| 232 | "D3D11_DSV_DIMENSION_TEXTURE1D", |
| 233 | "D3D11_DSV_DIMENSION_TEXTURE1DARRAY", |
| 234 | "D3D11_DSV_DIMENSION_TEXTURE2D", |
| 235 | "D3D11_DSV_DIMENSION_TEXTURE2DARRAY", |
| 236 | "D3D11_DSV_DIMENSION_TEXTURE2DMS", |
| 237 | "D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 238 | ]) |
| 239 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 240 | D3D11_RTV_DIMENSION = Enum("D3D11_RTV_DIMENSION", [ |
| 241 | "D3D11_RTV_DIMENSION_UNKNOWN", |
| 242 | "D3D11_RTV_DIMENSION_BUFFER", |
| 243 | "D3D11_RTV_DIMENSION_TEXTURE1D", |
| 244 | "D3D11_RTV_DIMENSION_TEXTURE1DARRAY", |
| 245 | "D3D11_RTV_DIMENSION_TEXTURE2D", |
| 246 | "D3D11_RTV_DIMENSION_TEXTURE2DARRAY", |
| 247 | "D3D11_RTV_DIMENSION_TEXTURE2DMS", |
| 248 | "D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY", |
| 249 | "D3D11_RTV_DIMENSION_TEXTURE3D", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 250 | ]) |
| 251 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 252 | D3D11_UAV_DIMENSION = Enum("D3D11_UAV_DIMENSION", [ |
| 253 | "D3D11_UAV_DIMENSION_UNKNOWN", |
| 254 | "D3D11_UAV_DIMENSION_BUFFER", |
| 255 | "D3D11_UAV_DIMENSION_TEXTURE1D", |
| 256 | "D3D11_UAV_DIMENSION_TEXTURE1DARRAY", |
| 257 | "D3D11_UAV_DIMENSION_TEXTURE2D", |
| 258 | "D3D11_UAV_DIMENSION_TEXTURE2DARRAY", |
| 259 | "D3D11_UAV_DIMENSION_TEXTURE3D", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 260 | ]) |
| 261 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 262 | D3D11_USAGE = Enum("D3D11_USAGE", [ |
| 263 | "D3D11_USAGE_DEFAULT", |
| 264 | "D3D11_USAGE_IMMUTABLE", |
| 265 | "D3D11_USAGE_DYNAMIC", |
| 266 | "D3D11_USAGE_STAGING", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 267 | ]) |
| 268 | |
| 269 | D3D11_BIND_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 270 | "D3D11_BIND_VERTEX_BUFFER", |
| 271 | "D3D11_BIND_INDEX_BUFFER", |
| 272 | "D3D11_BIND_CONSTANT_BUFFER", |
| 273 | "D3D11_BIND_SHADER_RESOURCE", |
| 274 | "D3D11_BIND_STREAM_OUTPUT", |
| 275 | "D3D11_BIND_RENDER_TARGET", |
| 276 | "D3D11_BIND_DEPTH_STENCIL", |
| 277 | "D3D11_BIND_UNORDERED_ACCESS", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 278 | ]) |
| 279 | |
| 280 | D3D11_CPU_ACCESS_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 281 | "D3D11_CPU_ACCESS_WRITE", |
| 282 | "D3D11_CPU_ACCESS_READ", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 283 | ]) |
| 284 | |
| 285 | D3D11_RESOURCE_MISC_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 286 | "D3D11_RESOURCE_MISC_GENERATE_MIPS", |
| 287 | "D3D11_RESOURCE_MISC_SHARED", |
| 288 | "D3D11_RESOURCE_MISC_TEXTURECUBE", |
| 289 | "D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS", |
| 290 | "D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS", |
| 291 | "D3D11_RESOURCE_MISC_BUFFER_STRUCTURED", |
| 292 | "D3D11_RESOURCE_MISC_RESOURCE_CLAMP", |
| 293 | "D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX", |
| 294 | "D3D11_RESOURCE_MISC_GDI_COMPATIBLE", |
José Fonseca | f7b8d57 | 2014-09-26 10:38:43 +0100 | [diff] [blame] | 295 | "D3D11_RESOURCE_MISC_SHARED_NTHANDLE", |
| 296 | "D3D11_RESOURCE_MISC_RESTRICTED_CONTENT", |
| 297 | "D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE", |
| 298 | "D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER", |
| 299 | "D3D11_RESOURCE_MISC_GUARDED", |
| 300 | "D3D11_RESOURCE_MISC_TILE_POOL", |
| 301 | "D3D11_RESOURCE_MISC_TILED", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 302 | ]) |
| 303 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 304 | D3D11_MAP = Enum("D3D11_MAP", [ |
| 305 | "D3D11_MAP_READ", |
| 306 | "D3D11_MAP_WRITE", |
| 307 | "D3D11_MAP_READ_WRITE", |
| 308 | "D3D11_MAP_WRITE_DISCARD", |
| 309 | "D3D11_MAP_WRITE_NO_OVERWRITE", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 310 | ]) |
| 311 | |
| 312 | D3D11_MAP_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 313 | "D3D11_MAP_FLAG_DO_NOT_WAIT", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 314 | ]) |
| 315 | |
| 316 | D3D11_RAISE_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 317 | "D3D11_RAISE_FLAG_DRIVER_INTERNAL_ERROR", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 318 | ]) |
| 319 | |
| 320 | D3D11_CLEAR_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 321 | "D3D11_CLEAR_DEPTH", |
| 322 | "D3D11_CLEAR_STENCIL", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 323 | ]) |
| 324 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 325 | D3D11_RECT = Alias("D3D11_RECT", RECT) |
| 326 | D3D11_BOX = Struct("D3D11_BOX", [ |
| 327 | (UINT, "left"), |
| 328 | (UINT, "top"), |
| 329 | (UINT, "front"), |
| 330 | (UINT, "right"), |
| 331 | (UINT, "bottom"), |
| 332 | (UINT, "back"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 333 | ]) |
| 334 | |
| 335 | ID3D11DeviceChild.methods += [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 336 | StdMethod(Void, "GetDevice", [Out(Pointer(ObjPointer(ID3D11Device)), "ppDevice")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 337 | StdMethod(HRESULT, "GetPrivateData", [(REFGUID, "guid"), InOut(Pointer(UINT), "pDataSize"), Out(OpaquePointer(Void), "pData")], sideeffects=False), |
José Fonseca | bc10e45 | 2012-11-08 10:24:45 +0000 | [diff] [blame] | 338 | StdMethod(HRESULT, "SetPrivateData", [(REFGUID, "guid"), (UINT, "DataSize"), (OpaqueBlob(Const(Void), "DataSize"), "pData")], sideeffects=False), |
| 339 | StdMethod(HRESULT, "SetPrivateDataInterface", [(REFGUID, "guid"), (OpaquePointer(Const(IUnknown)), "pData")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 340 | ] |
| 341 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 342 | D3D11_COMPARISON_FUNC = Enum("D3D11_COMPARISON_FUNC", [ |
| 343 | "D3D11_COMPARISON_NEVER", |
| 344 | "D3D11_COMPARISON_LESS", |
| 345 | "D3D11_COMPARISON_EQUAL", |
| 346 | "D3D11_COMPARISON_LESS_EQUAL", |
| 347 | "D3D11_COMPARISON_GREATER", |
| 348 | "D3D11_COMPARISON_NOT_EQUAL", |
| 349 | "D3D11_COMPARISON_GREATER_EQUAL", |
| 350 | "D3D11_COMPARISON_ALWAYS", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 351 | ]) |
| 352 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 353 | D3D11_DEPTH_WRITE_MASK = Enum("D3D11_DEPTH_WRITE_MASK", [ |
| 354 | "D3D11_DEPTH_WRITE_MASK_ZERO", |
| 355 | "D3D11_DEPTH_WRITE_MASK_ALL", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 356 | ]) |
| 357 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 358 | D3D11_STENCIL_OP = Enum("D3D11_STENCIL_OP", [ |
| 359 | "D3D11_STENCIL_OP_KEEP", |
| 360 | "D3D11_STENCIL_OP_ZERO", |
| 361 | "D3D11_STENCIL_OP_REPLACE", |
| 362 | "D3D11_STENCIL_OP_INCR_SAT", |
| 363 | "D3D11_STENCIL_OP_DECR_SAT", |
| 364 | "D3D11_STENCIL_OP_INVERT", |
| 365 | "D3D11_STENCIL_OP_INCR", |
| 366 | "D3D11_STENCIL_OP_DECR", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 367 | ]) |
| 368 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 369 | D3D11_DEPTH_STENCILOP_DESC = Struct("D3D11_DEPTH_STENCILOP_DESC", [ |
| 370 | (D3D11_STENCIL_OP, "StencilFailOp"), |
| 371 | (D3D11_STENCIL_OP, "StencilDepthFailOp"), |
| 372 | (D3D11_STENCIL_OP, "StencilPassOp"), |
| 373 | (D3D11_COMPARISON_FUNC, "StencilFunc"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 374 | ]) |
| 375 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 376 | D3D11_DEPTH_STENCIL_DESC = Struct("D3D11_DEPTH_STENCIL_DESC", [ |
| 377 | (BOOL, "DepthEnable"), |
| 378 | (D3D11_DEPTH_WRITE_MASK, "DepthWriteMask"), |
| 379 | (D3D11_COMPARISON_FUNC, "DepthFunc"), |
| 380 | (BOOL, "StencilEnable"), |
| 381 | (UINT8, "StencilReadMask"), |
| 382 | (UINT8, "StencilWriteMask"), |
| 383 | (D3D11_DEPTH_STENCILOP_DESC, "FrontFace"), |
| 384 | (D3D11_DEPTH_STENCILOP_DESC, "BackFace"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 385 | ]) |
| 386 | |
| 387 | ID3D11DepthStencilState.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 388 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_DEPTH_STENCIL_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 389 | ] |
| 390 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 391 | D3D11_BLEND = Enum("D3D11_BLEND", [ |
| 392 | "D3D11_BLEND_ZERO", |
| 393 | "D3D11_BLEND_ONE", |
| 394 | "D3D11_BLEND_SRC_COLOR", |
| 395 | "D3D11_BLEND_INV_SRC_COLOR", |
| 396 | "D3D11_BLEND_SRC_ALPHA", |
| 397 | "D3D11_BLEND_INV_SRC_ALPHA", |
| 398 | "D3D11_BLEND_DEST_ALPHA", |
| 399 | "D3D11_BLEND_INV_DEST_ALPHA", |
| 400 | "D3D11_BLEND_DEST_COLOR", |
| 401 | "D3D11_BLEND_INV_DEST_COLOR", |
| 402 | "D3D11_BLEND_SRC_ALPHA_SAT", |
| 403 | "D3D11_BLEND_BLEND_FACTOR", |
| 404 | "D3D11_BLEND_INV_BLEND_FACTOR", |
| 405 | "D3D11_BLEND_SRC1_COLOR", |
| 406 | "D3D11_BLEND_INV_SRC1_COLOR", |
| 407 | "D3D11_BLEND_SRC1_ALPHA", |
| 408 | "D3D11_BLEND_INV_SRC1_ALPHA", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 409 | ]) |
| 410 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 411 | D3D11_BLEND_OP = Enum("D3D11_BLEND_OP", [ |
| 412 | "D3D11_BLEND_OP_ADD", |
| 413 | "D3D11_BLEND_OP_SUBTRACT", |
| 414 | "D3D11_BLEND_OP_REV_SUBTRACT", |
| 415 | "D3D11_BLEND_OP_MIN", |
| 416 | "D3D11_BLEND_OP_MAX", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 417 | ]) |
| 418 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 419 | D3D11_COLOR_WRITE_ENABLE = Enum("D3D11_COLOR_WRITE_ENABLE", [ |
| 420 | "D3D11_COLOR_WRITE_ENABLE_ALL", |
| 421 | "D3D11_COLOR_WRITE_ENABLE_RED", |
| 422 | "D3D11_COLOR_WRITE_ENABLE_GREEN", |
| 423 | "D3D11_COLOR_WRITE_ENABLE_BLUE", |
| 424 | "D3D11_COLOR_WRITE_ENABLE_ALPHA", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 425 | ]) |
| 426 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 427 | D3D11_RENDER_TARGET_BLEND_DESC = Struct("D3D11_RENDER_TARGET_BLEND_DESC", [ |
| 428 | (BOOL, "BlendEnable"), |
| 429 | (D3D11_BLEND, "SrcBlend"), |
| 430 | (D3D11_BLEND, "DestBlend"), |
| 431 | (D3D11_BLEND_OP, "BlendOp"), |
| 432 | (D3D11_BLEND, "SrcBlendAlpha"), |
| 433 | (D3D11_BLEND, "DestBlendAlpha"), |
| 434 | (D3D11_BLEND_OP, "BlendOpAlpha"), |
| 435 | (UINT8, "RenderTargetWriteMask"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 436 | ]) |
| 437 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 438 | D3D11_BLEND_DESC = Struct("D3D11_BLEND_DESC", [ |
| 439 | (BOOL, "AlphaToCoverageEnable"), |
| 440 | (BOOL, "IndependentBlendEnable"), |
| 441 | (Array(D3D11_RENDER_TARGET_BLEND_DESC, 8), "RenderTarget"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 442 | ]) |
| 443 | |
| 444 | ID3D11BlendState.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 445 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_BLEND_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 446 | ] |
| 447 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 448 | D3D11_RASTERIZER_DESC = Struct("D3D11_RASTERIZER_DESC", [ |
| 449 | (D3D11_FILL_MODE, "FillMode"), |
| 450 | (D3D11_CULL_MODE, "CullMode"), |
| 451 | (BOOL, "FrontCounterClockwise"), |
| 452 | (INT, "DepthBias"), |
| 453 | (FLOAT, "DepthBiasClamp"), |
| 454 | (FLOAT, "SlopeScaledDepthBias"), |
| 455 | (BOOL, "DepthClipEnable"), |
| 456 | (BOOL, "ScissorEnable"), |
| 457 | (BOOL, "MultisampleEnable"), |
| 458 | (BOOL, "AntialiasedLineEnable"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 459 | ]) |
| 460 | |
| 461 | ID3D11RasterizerState.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 462 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_RASTERIZER_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 463 | ] |
| 464 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 465 | D3D11_SUBRESOURCE_DATA = Struct("D3D11_SUBRESOURCE_DATA", [ |
José Fonseca | 8f6e0e3 | 2012-11-07 19:22:20 +0000 | [diff] [blame] | 466 | (Blob(Const(Void), "_calcSubresourceSize(pDesc, {i}, {self}.SysMemPitch, {self}.SysMemSlicePitch)"), "pSysMem"), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 467 | (UINT, "SysMemPitch"), |
| 468 | (UINT, "SysMemSlicePitch"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 469 | ]) |
| 470 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 471 | D3D11_MAPPED_SUBRESOURCE = Struct("D3D11_MAPPED_SUBRESOURCE", [ |
José Fonseca | e6bde44 | 2012-11-14 08:45:58 +0000 | [diff] [blame] | 472 | (LinearPointer(Void, "_MappedSize"), "pData"), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 473 | (UINT, "RowPitch"), |
| 474 | (UINT, "DepthPitch"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 475 | ]) |
| 476 | |
| 477 | ID3D11Resource.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 478 | StdMethod(Void, "GetType", [Out(Pointer(D3D11_RESOURCE_DIMENSION), "pResourceDimension")], sideeffects=False), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 479 | StdMethod(Void, "SetEvictionPriority", [(UINT, "EvictionPriority")]), |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 480 | StdMethod(UINT, "GetEvictionPriority", [], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 481 | ] |
| 482 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 483 | D3D11_BUFFER_DESC = Struct("D3D11_BUFFER_DESC", [ |
| 484 | (UINT, "ByteWidth"), |
| 485 | (D3D11_USAGE, "Usage"), |
| 486 | (D3D11_BIND_FLAG, "BindFlags"), |
| 487 | (D3D11_CPU_ACCESS_FLAG, "CPUAccessFlags"), |
| 488 | (D3D11_RESOURCE_MISC_FLAG, "MiscFlags"), |
| 489 | (UINT, "StructureByteStride"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 490 | ]) |
| 491 | |
| 492 | ID3D11Buffer.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 493 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_BUFFER_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 494 | ] |
| 495 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 496 | D3D11_TEXTURE1D_DESC = Struct("D3D11_TEXTURE1D_DESC", [ |
| 497 | (UINT, "Width"), |
| 498 | (UINT, "MipLevels"), |
| 499 | (UINT, "ArraySize"), |
| 500 | (DXGI_FORMAT, "Format"), |
| 501 | (D3D11_USAGE, "Usage"), |
| 502 | (D3D11_BIND_FLAG, "BindFlags"), |
| 503 | (D3D11_CPU_ACCESS_FLAG, "CPUAccessFlags"), |
| 504 | (D3D11_RESOURCE_MISC_FLAG, "MiscFlags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 505 | ]) |
| 506 | |
| 507 | ID3D11Texture1D.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 508 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_TEXTURE1D_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 509 | ] |
| 510 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 511 | D3D11_TEXTURE2D_DESC = Struct("D3D11_TEXTURE2D_DESC", [ |
| 512 | (UINT, "Width"), |
| 513 | (UINT, "Height"), |
| 514 | (UINT, "MipLevels"), |
| 515 | (UINT, "ArraySize"), |
| 516 | (DXGI_FORMAT, "Format"), |
| 517 | (DXGI_SAMPLE_DESC, "SampleDesc"), |
| 518 | (D3D11_USAGE, "Usage"), |
| 519 | (D3D11_BIND_FLAG, "BindFlags"), |
| 520 | (D3D11_CPU_ACCESS_FLAG, "CPUAccessFlags"), |
| 521 | (D3D11_RESOURCE_MISC_FLAG, "MiscFlags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 522 | ]) |
| 523 | |
| 524 | ID3D11Texture2D.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 525 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_TEXTURE2D_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 526 | ] |
| 527 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 528 | D3D11_TEXTURE3D_DESC = Struct("D3D11_TEXTURE3D_DESC", [ |
| 529 | (UINT, "Width"), |
| 530 | (UINT, "Height"), |
| 531 | (UINT, "Depth"), |
| 532 | (UINT, "MipLevels"), |
| 533 | (DXGI_FORMAT, "Format"), |
| 534 | (D3D11_USAGE, "Usage"), |
| 535 | (D3D11_BIND_FLAG, "BindFlags"), |
| 536 | (D3D11_CPU_ACCESS_FLAG, "CPUAccessFlags"), |
| 537 | (D3D11_RESOURCE_MISC_FLAG, "MiscFlags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 538 | ]) |
| 539 | |
| 540 | ID3D11Texture3D.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 541 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_TEXTURE3D_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 542 | ] |
| 543 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 544 | D3D11_TEXTURECUBE_FACE = Enum("D3D11_TEXTURECUBE_FACE", [ |
| 545 | "D3D11_TEXTURECUBE_FACE_POSITIVE_X", |
| 546 | "D3D11_TEXTURECUBE_FACE_NEGATIVE_X", |
| 547 | "D3D11_TEXTURECUBE_FACE_POSITIVE_Y", |
| 548 | "D3D11_TEXTURECUBE_FACE_NEGATIVE_Y", |
| 549 | "D3D11_TEXTURECUBE_FACE_POSITIVE_Z", |
| 550 | "D3D11_TEXTURECUBE_FACE_NEGATIVE_Z", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 551 | ]) |
| 552 | |
| 553 | ID3D11View.methods += [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 554 | StdMethod(Void, "GetResource", [Out(Pointer(ObjPointer(ID3D11Resource)), "ppResource")]), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 555 | ] |
| 556 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 557 | D3D11_BUFFER_SRV = Struct("D3D11_BUFFER_SRV", [ |
José Fonseca | 5f4b6e3 | 2012-11-20 10:47:10 +0000 | [diff] [blame] | 558 | (UINT, "FirstElement"), |
| 559 | (UINT, "NumElements"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 560 | ]) |
| 561 | |
| 562 | D3D11_BUFFEREX_SRV_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 563 | "D3D11_BUFFEREX_SRV_FLAG_RAW", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 564 | ]) |
| 565 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 566 | D3D11_BUFFEREX_SRV = Struct("D3D11_BUFFEREX_SRV", [ |
| 567 | (UINT, "FirstElement"), |
| 568 | (UINT, "NumElements"), |
| 569 | (D3D11_BUFFEREX_SRV_FLAG, "Flags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 570 | ]) |
| 571 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 572 | D3D11_TEX1D_SRV = Struct("D3D11_TEX1D_SRV", [ |
| 573 | (UINT, "MostDetailedMip"), |
| 574 | (UINT, "MipLevels"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 575 | ]) |
| 576 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 577 | D3D11_TEX1D_ARRAY_SRV = Struct("D3D11_TEX1D_ARRAY_SRV", [ |
| 578 | (UINT, "MostDetailedMip"), |
| 579 | (UINT, "MipLevels"), |
| 580 | (UINT, "FirstArraySlice"), |
| 581 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 582 | ]) |
| 583 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 584 | D3D11_TEX2D_SRV = Struct("D3D11_TEX2D_SRV", [ |
| 585 | (UINT, "MostDetailedMip"), |
| 586 | (UINT, "MipLevels"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 587 | ]) |
| 588 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 589 | D3D11_TEX2D_ARRAY_SRV = Struct("D3D11_TEX2D_ARRAY_SRV", [ |
| 590 | (UINT, "MostDetailedMip"), |
| 591 | (UINT, "MipLevels"), |
| 592 | (UINT, "FirstArraySlice"), |
| 593 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 594 | ]) |
| 595 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 596 | D3D11_TEX3D_SRV = Struct("D3D11_TEX3D_SRV", [ |
| 597 | (UINT, "MostDetailedMip"), |
| 598 | (UINT, "MipLevels"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 599 | ]) |
| 600 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 601 | D3D11_TEXCUBE_SRV = Struct("D3D11_TEXCUBE_SRV", [ |
| 602 | (UINT, "MostDetailedMip"), |
| 603 | (UINT, "MipLevels"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 604 | ]) |
| 605 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 606 | D3D11_TEXCUBE_ARRAY_SRV = Struct("D3D11_TEXCUBE_ARRAY_SRV", [ |
| 607 | (UINT, "MostDetailedMip"), |
| 608 | (UINT, "MipLevels"), |
| 609 | (UINT, "First2DArrayFace"), |
| 610 | (UINT, "NumCubes"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 611 | ]) |
| 612 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 613 | D3D11_TEX2DMS_SRV = Struct("D3D11_TEX2DMS_SRV", [ |
| 614 | (UINT, "UnusedField_NothingToDefine"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 615 | ]) |
| 616 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 617 | D3D11_TEX2DMS_ARRAY_SRV = Struct("D3D11_TEX2DMS_ARRAY_SRV", [ |
| 618 | (UINT, "FirstArraySlice"), |
| 619 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 620 | ]) |
| 621 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 622 | D3D11_SHADER_RESOURCE_VIEW_DESC = Struct("D3D11_SHADER_RESOURCE_VIEW_DESC", [ |
| 623 | (DXGI_FORMAT, "Format"), |
| 624 | (D3D11_SRV_DIMENSION, "ViewDimension"), |
José Fonseca | dbf714b | 2012-11-20 17:03:43 +0000 | [diff] [blame] | 625 | (Union("{self}.ViewDimension", [ |
| 626 | ("D3D11_SRV_DIMENSION_BUFFER", D3D11_BUFFER_SRV, "Buffer"), |
| 627 | ("D3D11_SRV_DIMENSION_TEXTURE1D", D3D11_TEX1D_SRV, "Texture1D"), |
| 628 | ("D3D11_SRV_DIMENSION_TEXTURE1DARRAY", D3D11_TEX1D_ARRAY_SRV, "Texture1DArray"), |
| 629 | ("D3D11_SRV_DIMENSION_TEXTURE2D", D3D11_TEX2D_SRV, "Texture2D"), |
| 630 | ("D3D11_SRV_DIMENSION_TEXTURE2DARRAY", D3D11_TEX2D_ARRAY_SRV, "Texture2DArray"), |
| 631 | ("D3D11_SRV_DIMENSION_TEXTURE2DMS", D3D11_TEX2DMS_SRV, "Texture2DMS"), |
| 632 | ("D3D11_SRV_DIMENSION_TEXTURE2DMSARRAY", D3D11_TEX2DMS_ARRAY_SRV, "Texture2DMSArray"), |
| 633 | ("D3D11_SRV_DIMENSION_TEXTURE3D", D3D11_TEX3D_SRV, "Texture3D"), |
| 634 | ("D3D11_SRV_DIMENSION_TEXTURECUBE", D3D11_TEXCUBE_SRV, "TextureCube"), |
| 635 | ("D3D11_SRV_DIMENSION_TEXTURECUBEARRAY", D3D11_TEXCUBE_ARRAY_SRV, "TextureCubeArray"), |
| 636 | ("D3D11_SRV_DIMENSION_BUFFEREX", D3D11_BUFFEREX_SRV, "BufferEx"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 637 | ]), None), |
| 638 | ]) |
| 639 | |
| 640 | ID3D11ShaderResourceView.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 641 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_SHADER_RESOURCE_VIEW_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 642 | ] |
| 643 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 644 | D3D11_BUFFER_RTV = Struct("D3D11_BUFFER_RTV", [ |
José Fonseca | 5f4b6e3 | 2012-11-20 10:47:10 +0000 | [diff] [blame] | 645 | (UINT, "FirstElement"), |
| 646 | (UINT, "NumElements"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 647 | ]) |
| 648 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 649 | D3D11_TEX1D_RTV = Struct("D3D11_TEX1D_RTV", [ |
| 650 | (UINT, "MipSlice"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 651 | ]) |
| 652 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 653 | D3D11_TEX1D_ARRAY_RTV = Struct("D3D11_TEX1D_ARRAY_RTV", [ |
| 654 | (UINT, "MipSlice"), |
| 655 | (UINT, "FirstArraySlice"), |
| 656 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 657 | ]) |
| 658 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 659 | D3D11_TEX2D_RTV = Struct("D3D11_TEX2D_RTV", [ |
| 660 | (UINT, "MipSlice"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 661 | ]) |
| 662 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 663 | D3D11_TEX2DMS_RTV = Struct("D3D11_TEX2DMS_RTV", [ |
| 664 | (UINT, "UnusedField_NothingToDefine"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 665 | ]) |
| 666 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 667 | D3D11_TEX2D_ARRAY_RTV = Struct("D3D11_TEX2D_ARRAY_RTV", [ |
| 668 | (UINT, "MipSlice"), |
| 669 | (UINT, "FirstArraySlice"), |
| 670 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 671 | ]) |
| 672 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 673 | D3D11_TEX2DMS_ARRAY_RTV = Struct("D3D11_TEX2DMS_ARRAY_RTV", [ |
| 674 | (UINT, "FirstArraySlice"), |
| 675 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 676 | ]) |
| 677 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 678 | D3D11_TEX3D_RTV = Struct("D3D11_TEX3D_RTV", [ |
| 679 | (UINT, "MipSlice"), |
| 680 | (UINT, "FirstWSlice"), |
| 681 | (UINT, "WSize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 682 | ]) |
| 683 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 684 | D3D11_RENDER_TARGET_VIEW_DESC = Struct("D3D11_RENDER_TARGET_VIEW_DESC", [ |
| 685 | (DXGI_FORMAT, "Format"), |
| 686 | (D3D11_RTV_DIMENSION, "ViewDimension"), |
José Fonseca | dbf714b | 2012-11-20 17:03:43 +0000 | [diff] [blame] | 687 | (Union("{self}.ViewDimension", [ |
José Fonseca | eb216e6 | 2012-11-20 11:08:08 +0000 | [diff] [blame] | 688 | ("D3D11_RTV_DIMENSION_BUFFER", D3D11_BUFFER_RTV, "Buffer"), |
| 689 | ("D3D11_RTV_DIMENSION_TEXTURE1D", D3D11_TEX1D_RTV, "Texture1D"), |
| 690 | ("D3D11_RTV_DIMENSION_TEXTURE1DARRAY", D3D11_TEX1D_ARRAY_RTV, "Texture1DArray"), |
| 691 | ("D3D11_RTV_DIMENSION_TEXTURE2D", D3D11_TEX2D_RTV, "Texture2D"), |
| 692 | ("D3D11_RTV_DIMENSION_TEXTURE2DARRAY", D3D11_TEX2D_ARRAY_RTV, "Texture2DArray"), |
| 693 | ("D3D11_RTV_DIMENSION_TEXTURE2DMS", D3D11_TEX2DMS_RTV, "Texture2DMS"), |
| 694 | ("D3D11_RTV_DIMENSION_TEXTURE2DMSARRAY", D3D11_TEX2DMS_ARRAY_RTV, "Texture2DMSArray"), |
| 695 | ("D3D11_RTV_DIMENSION_TEXTURE3D", D3D11_TEX3D_RTV, "Texture3D"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 696 | ]), None), |
| 697 | ]) |
| 698 | |
| 699 | ID3D11RenderTargetView.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 700 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_RENDER_TARGET_VIEW_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 701 | ] |
| 702 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 703 | D3D11_TEX1D_DSV = Struct("D3D11_TEX1D_DSV", [ |
| 704 | (UINT, "MipSlice"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 705 | ]) |
| 706 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 707 | D3D11_TEX1D_ARRAY_DSV = Struct("D3D11_TEX1D_ARRAY_DSV", [ |
| 708 | (UINT, "MipSlice"), |
| 709 | (UINT, "FirstArraySlice"), |
| 710 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 711 | ]) |
| 712 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 713 | D3D11_TEX2D_DSV = Struct("D3D11_TEX2D_DSV", [ |
| 714 | (UINT, "MipSlice"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 715 | ]) |
| 716 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 717 | D3D11_TEX2D_ARRAY_DSV = Struct("D3D11_TEX2D_ARRAY_DSV", [ |
| 718 | (UINT, "MipSlice"), |
| 719 | (UINT, "FirstArraySlice"), |
| 720 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 721 | ]) |
| 722 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 723 | D3D11_TEX2DMS_DSV = Struct("D3D11_TEX2DMS_DSV", [ |
| 724 | (UINT, "UnusedField_NothingToDefine"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 725 | ]) |
| 726 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 727 | D3D11_TEX2DMS_ARRAY_DSV = Struct("D3D11_TEX2DMS_ARRAY_DSV", [ |
| 728 | (UINT, "FirstArraySlice"), |
| 729 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 730 | ]) |
| 731 | |
| 732 | D3D11_DSV_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 733 | "D3D11_DSV_READ_ONLY_DEPTH", |
| 734 | "D3D11_DSV_READ_ONLY_STENCIL", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 735 | ]) |
| 736 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 737 | D3D11_DEPTH_STENCIL_VIEW_DESC = Struct("D3D11_DEPTH_STENCIL_VIEW_DESC", [ |
| 738 | (DXGI_FORMAT, "Format"), |
| 739 | (D3D11_DSV_DIMENSION, "ViewDimension"), |
| 740 | (D3D11_DSV_FLAG, "Flags"), |
José Fonseca | dbf714b | 2012-11-20 17:03:43 +0000 | [diff] [blame] | 741 | (Union("{self}.ViewDimension", [ |
| 742 | ("D3D11_DSV_DIMENSION_TEXTURE1D", D3D11_TEX1D_DSV, "Texture1D"), |
| 743 | ("D3D11_DSV_DIMENSION_TEXTURE1DARRAY", D3D11_TEX1D_ARRAY_DSV, "Texture1DArray"), |
| 744 | ("D3D11_DSV_DIMENSION_TEXTURE2D", D3D11_TEX2D_DSV, "Texture2D"), |
| 745 | ("D3D11_DSV_DIMENSION_TEXTURE2DARRAY", D3D11_TEX2D_ARRAY_DSV, "Texture2DArray"), |
| 746 | ("D3D11_DSV_DIMENSION_TEXTURE2DMS", D3D11_TEX2DMS_DSV, "Texture2DMS"), |
| 747 | ("D3D11_DSV_DIMENSION_TEXTURE2DMSARRAY", D3D11_TEX2DMS_ARRAY_DSV, "Texture2DMSArray"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 748 | ]), None), |
| 749 | ]) |
| 750 | |
| 751 | ID3D11DepthStencilView.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 752 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_DEPTH_STENCIL_VIEW_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 753 | ] |
| 754 | |
| 755 | D3D11_BUFFER_UAV_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 756 | "D3D11_BUFFER_UAV_FLAG_RAW", |
| 757 | "D3D11_BUFFER_UAV_FLAG_APPEND", |
| 758 | "D3D11_BUFFER_UAV_FLAG_COUNTER", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 759 | ]) |
| 760 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 761 | D3D11_BUFFER_UAV = Struct("D3D11_BUFFER_UAV", [ |
| 762 | (UINT, "FirstElement"), |
| 763 | (UINT, "NumElements"), |
| 764 | (D3D11_BUFFER_UAV_FLAG, "Flags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 765 | ]) |
| 766 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 767 | D3D11_TEX1D_UAV = Struct("D3D11_TEX1D_UAV", [ |
| 768 | (UINT, "MipSlice"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 769 | ]) |
| 770 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 771 | D3D11_TEX1D_ARRAY_UAV = Struct("D3D11_TEX1D_ARRAY_UAV", [ |
| 772 | (UINT, "MipSlice"), |
| 773 | (UINT, "FirstArraySlice"), |
| 774 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 775 | ]) |
| 776 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 777 | D3D11_TEX2D_UAV = Struct("D3D11_TEX2D_UAV", [ |
| 778 | (UINT, "MipSlice"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 779 | ]) |
| 780 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 781 | D3D11_TEX2D_ARRAY_UAV = Struct("D3D11_TEX2D_ARRAY_UAV", [ |
| 782 | (UINT, "MipSlice"), |
| 783 | (UINT, "FirstArraySlice"), |
| 784 | (UINT, "ArraySize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 785 | ]) |
| 786 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 787 | D3D11_TEX3D_UAV = Struct("D3D11_TEX3D_UAV", [ |
| 788 | (UINT, "MipSlice"), |
| 789 | (UINT, "FirstWSlice"), |
| 790 | (UINT, "WSize"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 791 | ]) |
| 792 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 793 | D3D11_UNORDERED_ACCESS_VIEW_DESC = Struct("D3D11_UNORDERED_ACCESS_VIEW_DESC", [ |
| 794 | (DXGI_FORMAT, "Format"), |
| 795 | (D3D11_UAV_DIMENSION, "ViewDimension"), |
José Fonseca | dbf714b | 2012-11-20 17:03:43 +0000 | [diff] [blame] | 796 | (Union("{self}.ViewDimension", [ |
| 797 | ("D3D11_UAV_DIMENSION_BUFFER", D3D11_BUFFER_UAV, "Buffer"), |
| 798 | ("D3D11_UAV_DIMENSION_TEXTURE1D", D3D11_TEX1D_UAV, "Texture1D"), |
| 799 | ("D3D11_UAV_DIMENSION_TEXTURE1DARRAY", D3D11_TEX1D_ARRAY_UAV, "Texture1DArray"), |
| 800 | ("D3D11_UAV_DIMENSION_TEXTURE2D", D3D11_TEX2D_UAV, "Texture2D"), |
| 801 | ("D3D11_UAV_DIMENSION_TEXTURE2DARRAY", D3D11_TEX2D_ARRAY_UAV, "Texture2DArray"), |
| 802 | ("D3D11_UAV_DIMENSION_TEXTURE3D", D3D11_TEX3D_UAV, "Texture3D"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 803 | ]), None), |
| 804 | ]) |
| 805 | |
| 806 | ID3D11UnorderedAccessView.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 807 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_UNORDERED_ACCESS_VIEW_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 808 | ] |
| 809 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 810 | D3D11_FILTER = Enum("D3D11_FILTER", [ |
| 811 | "D3D11_FILTER_MIN_MAG_MIP_POINT", |
| 812 | "D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR", |
| 813 | "D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT", |
| 814 | "D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR", |
| 815 | "D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT", |
| 816 | "D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR", |
| 817 | "D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT", |
| 818 | "D3D11_FILTER_MIN_MAG_MIP_LINEAR", |
| 819 | "D3D11_FILTER_ANISOTROPIC", |
| 820 | "D3D11_FILTER_COMPARISON_MIN_MAG_MIP_POINT", |
| 821 | "D3D11_FILTER_COMPARISON_MIN_MAG_POINT_MIP_LINEAR", |
| 822 | "D3D11_FILTER_COMPARISON_MIN_POINT_MAG_LINEAR_MIP_POINT", |
| 823 | "D3D11_FILTER_COMPARISON_MIN_POINT_MAG_MIP_LINEAR", |
| 824 | "D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_MIP_POINT", |
| 825 | "D3D11_FILTER_COMPARISON_MIN_LINEAR_MAG_POINT_MIP_LINEAR", |
| 826 | "D3D11_FILTER_COMPARISON_MIN_MAG_LINEAR_MIP_POINT", |
| 827 | "D3D11_FILTER_COMPARISON_MIN_MAG_MIP_LINEAR", |
| 828 | "D3D11_FILTER_COMPARISON_ANISOTROPIC", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 829 | ]) |
| 830 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 831 | D3D11_FILTER_TYPE = Enum("D3D11_FILTER_TYPE", [ |
| 832 | "D3D11_FILTER_TYPE_POINT", |
| 833 | "D3D11_FILTER_TYPE_LINEAR", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 834 | ]) |
| 835 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 836 | D3D11_TEXTURE_ADDRESS_MODE = Enum("D3D11_TEXTURE_ADDRESS_MODE", [ |
| 837 | "D3D11_TEXTURE_ADDRESS_WRAP", |
| 838 | "D3D11_TEXTURE_ADDRESS_MIRROR", |
| 839 | "D3D11_TEXTURE_ADDRESS_CLAMP", |
| 840 | "D3D11_TEXTURE_ADDRESS_BORDER", |
| 841 | "D3D11_TEXTURE_ADDRESS_MIRROR_ONCE", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 842 | ]) |
| 843 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 844 | D3D11_SAMPLER_DESC = Struct("D3D11_SAMPLER_DESC", [ |
| 845 | (D3D11_FILTER, "Filter"), |
| 846 | (D3D11_TEXTURE_ADDRESS_MODE, "AddressU"), |
| 847 | (D3D11_TEXTURE_ADDRESS_MODE, "AddressV"), |
| 848 | (D3D11_TEXTURE_ADDRESS_MODE, "AddressW"), |
| 849 | (FLOAT, "MipLODBias"), |
| 850 | (UINT, "MaxAnisotropy"), |
| 851 | (D3D11_COMPARISON_FUNC, "ComparisonFunc"), |
| 852 | (Array(FLOAT, 4), "BorderColor"), |
| 853 | (FLOAT, "MinLOD"), |
| 854 | (FLOAT, "MaxLOD"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 855 | ]) |
| 856 | |
| 857 | ID3D11SamplerState.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 858 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_SAMPLER_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 859 | ] |
| 860 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 861 | D3D11_FORMAT_SUPPORT = Flags(UINT, [ |
| 862 | "D3D11_FORMAT_SUPPORT_BUFFER", |
| 863 | "D3D11_FORMAT_SUPPORT_IA_VERTEX_BUFFER", |
| 864 | "D3D11_FORMAT_SUPPORT_IA_INDEX_BUFFER", |
| 865 | "D3D11_FORMAT_SUPPORT_SO_BUFFER", |
| 866 | "D3D11_FORMAT_SUPPORT_TEXTURE1D", |
| 867 | "D3D11_FORMAT_SUPPORT_TEXTURE2D", |
| 868 | "D3D11_FORMAT_SUPPORT_TEXTURE3D", |
| 869 | "D3D11_FORMAT_SUPPORT_TEXTURECUBE", |
| 870 | "D3D11_FORMAT_SUPPORT_SHADER_LOAD", |
| 871 | "D3D11_FORMAT_SUPPORT_SHADER_SAMPLE", |
| 872 | "D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_COMPARISON", |
| 873 | "D3D11_FORMAT_SUPPORT_SHADER_SAMPLE_MONO_TEXT", |
| 874 | "D3D11_FORMAT_SUPPORT_MIP", |
| 875 | "D3D11_FORMAT_SUPPORT_MIP_AUTOGEN", |
| 876 | "D3D11_FORMAT_SUPPORT_RENDER_TARGET", |
| 877 | "D3D11_FORMAT_SUPPORT_BLENDABLE", |
| 878 | "D3D11_FORMAT_SUPPORT_DEPTH_STENCIL", |
| 879 | "D3D11_FORMAT_SUPPORT_CPU_LOCKABLE", |
| 880 | "D3D11_FORMAT_SUPPORT_MULTISAMPLE_RESOLVE", |
| 881 | "D3D11_FORMAT_SUPPORT_DISPLAY", |
| 882 | "D3D11_FORMAT_SUPPORT_CAST_WITHIN_BIT_LAYOUT", |
| 883 | "D3D11_FORMAT_SUPPORT_MULTISAMPLE_RENDERTARGET", |
| 884 | "D3D11_FORMAT_SUPPORT_MULTISAMPLE_LOAD", |
| 885 | "D3D11_FORMAT_SUPPORT_SHADER_GATHER", |
| 886 | "D3D11_FORMAT_SUPPORT_BACK_BUFFER_CAST", |
| 887 | "D3D11_FORMAT_SUPPORT_TYPED_UNORDERED_ACCESS_VIEW", |
| 888 | "D3D11_FORMAT_SUPPORT_SHADER_GATHER_COMPARISON", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 889 | ]) |
| 890 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 891 | D3D11_FORMAT_SUPPORT2 = Enum("D3D11_FORMAT_SUPPORT2", [ |
| 892 | "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_ADD", |
| 893 | "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_BITWISE_OPS", |
| 894 | "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_COMPARE_STORE_OR_COMPARE_EXCHANGE", |
| 895 | "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_EXCHANGE", |
| 896 | "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_SIGNED_MIN_OR_MAX", |
| 897 | "D3D11_FORMAT_SUPPORT2_UAV_ATOMIC_UNSIGNED_MIN_OR_MAX", |
| 898 | "D3D11_FORMAT_SUPPORT2_UAV_TYPED_LOAD", |
| 899 | "D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 900 | ]) |
| 901 | |
| 902 | ID3D11Asynchronous.methods += [ |
José Fonseca | bc10e45 | 2012-11-08 10:24:45 +0000 | [diff] [blame] | 903 | StdMethod(UINT, "GetDataSize", [], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 904 | ] |
| 905 | |
| 906 | D3D11_ASYNC_GETDATA_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 907 | "D3D11_ASYNC_GETDATA_DONOTFLUSH", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 908 | ]) |
| 909 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 910 | D3D11_QUERY = Enum("D3D11_QUERY", [ |
| 911 | "D3D11_QUERY_EVENT", |
| 912 | "D3D11_QUERY_OCCLUSION", |
| 913 | "D3D11_QUERY_TIMESTAMP", |
| 914 | "D3D11_QUERY_TIMESTAMP_DISJOINT", |
| 915 | "D3D11_QUERY_PIPELINE_STATISTICS", |
| 916 | "D3D11_QUERY_OCCLUSION_PREDICATE", |
| 917 | "D3D11_QUERY_SO_STATISTICS", |
| 918 | "D3D11_QUERY_SO_OVERFLOW_PREDICATE", |
| 919 | "D3D11_QUERY_SO_STATISTICS_STREAM0", |
| 920 | "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0", |
| 921 | "D3D11_QUERY_SO_STATISTICS_STREAM1", |
| 922 | "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1", |
| 923 | "D3D11_QUERY_SO_STATISTICS_STREAM2", |
| 924 | "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2", |
| 925 | "D3D11_QUERY_SO_STATISTICS_STREAM3", |
| 926 | "D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 927 | ]) |
| 928 | |
| 929 | D3D11_QUERY_MISC_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 930 | "D3D11_QUERY_MISC_PREDICATEHINT", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 931 | ]) |
| 932 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 933 | D3D11_QUERY_DESC = Struct("D3D11_QUERY_DESC", [ |
| 934 | (D3D11_QUERY, "Query"), |
| 935 | (D3D11_QUERY_MISC_FLAG, "MiscFlags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 936 | ]) |
| 937 | |
| 938 | ID3D11Query.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 939 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_QUERY_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 940 | ] |
| 941 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 942 | D3D11_QUERY_DATA_TIMESTAMP_DISJOINT = Struct("D3D11_QUERY_DATA_TIMESTAMP_DISJOINT", [ |
| 943 | (UINT64, "Frequency"), |
| 944 | (BOOL, "Disjoint"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 945 | ]) |
| 946 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 947 | D3D11_QUERY_DATA_PIPELINE_STATISTICS = Struct("D3D11_QUERY_DATA_PIPELINE_STATISTICS", [ |
| 948 | (UINT64, "IAVertices"), |
| 949 | (UINT64, "IAPrimitives"), |
| 950 | (UINT64, "VSInvocations"), |
| 951 | (UINT64, "GSInvocations"), |
| 952 | (UINT64, "GSPrimitives"), |
| 953 | (UINT64, "CInvocations"), |
| 954 | (UINT64, "CPrimitives"), |
| 955 | (UINT64, "PSInvocations"), |
| 956 | (UINT64, "HSInvocations"), |
| 957 | (UINT64, "DSInvocations"), |
| 958 | (UINT64, "CSInvocations"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 959 | ]) |
| 960 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 961 | D3D11_QUERY_DATA_SO_STATISTICS = Struct("D3D11_QUERY_DATA_SO_STATISTICS", [ |
| 962 | (UINT64, "NumPrimitivesWritten"), |
| 963 | (UINT64, "PrimitivesStorageNeeded"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 964 | ]) |
| 965 | |
José Fonseca | dbc46f0 | 2014-08-15 17:04:17 +0100 | [diff] [blame] | 966 | D3D11_QUERY_DATA = Polymorphic("_getQueryType(pAsync)", [ |
| 967 | ("D3D11_QUERY_EVENT", Pointer(BOOL)), |
| 968 | ("D3D11_QUERY_OCCLUSION", Pointer(UINT64)), |
| 969 | ("D3D11_QUERY_TIMESTAMP", Pointer(UINT64)), |
| 970 | ("D3D11_QUERY_TIMESTAMP_DISJOINT", Pointer(D3D11_QUERY_DATA_TIMESTAMP_DISJOINT)), |
| 971 | ("D3D11_QUERY_PIPELINE_STATISTICS", Pointer(D3D11_QUERY_DATA_PIPELINE_STATISTICS)), |
| 972 | ("D3D11_QUERY_OCCLUSION_PREDICATE", Pointer(BOOL)), |
| 973 | ("D3D11_QUERY_SO_STATISTICS", Pointer(D3D11_QUERY_DATA_SO_STATISTICS)), |
| 974 | ("D3D11_QUERY_SO_OVERFLOW_PREDICATE", Pointer(BOOL)), |
| 975 | ("D3D11_QUERY_SO_STATISTICS_STREAM0", Pointer(D3D11_QUERY_DATA_SO_STATISTICS)), |
| 976 | ("D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0", Pointer(BOOL)), |
| 977 | ("D3D11_QUERY_SO_STATISTICS_STREAM1", Pointer(D3D11_QUERY_DATA_SO_STATISTICS)), |
| 978 | ("D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM1", Pointer(BOOL)), |
| 979 | ("D3D11_QUERY_SO_STATISTICS_STREAM2", Pointer(D3D11_QUERY_DATA_SO_STATISTICS)), |
| 980 | ("D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM2", Pointer(BOOL)), |
| 981 | ("D3D11_QUERY_SO_STATISTICS_STREAM3", Pointer(D3D11_QUERY_DATA_SO_STATISTICS)), |
| 982 | ("D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM3", Pointer(BOOL)), |
| 983 | ], Blob(Void, "DataSize"), contextLess=False) |
| 984 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 985 | D3D11_COUNTER = Enum("D3D11_COUNTER", [ |
| 986 | "D3D11_COUNTER_DEVICE_DEPENDENT_0", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 987 | ]) |
| 988 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 989 | D3D11_COUNTER_TYPE = Enum("D3D11_COUNTER_TYPE", [ |
| 990 | "D3D11_COUNTER_TYPE_FLOAT32", |
| 991 | "D3D11_COUNTER_TYPE_UINT16", |
| 992 | "D3D11_COUNTER_TYPE_UINT32", |
| 993 | "D3D11_COUNTER_TYPE_UINT64", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 994 | ]) |
| 995 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 996 | D3D11_COUNTER_DESC = Struct("D3D11_COUNTER_DESC", [ |
| 997 | (D3D11_COUNTER, "Counter"), |
| 998 | (UINT, "MiscFlags"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 999 | ]) |
| 1000 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1001 | D3D11_COUNTER_INFO = Struct("D3D11_COUNTER_INFO", [ |
| 1002 | (D3D11_COUNTER, "LastDeviceDependentCounter"), |
| 1003 | (UINT, "NumSimultaneousCounters"), |
| 1004 | (UINT8, "NumDetectableParallelUnits"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1005 | ]) |
| 1006 | |
| 1007 | ID3D11Counter.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 1008 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_COUNTER_DESC), "pDesc")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1009 | ] |
| 1010 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1011 | D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS = Enum("D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS", [ |
| 1012 | "D3D11_STANDARD_MULTISAMPLE_PATTERN", |
| 1013 | "D3D11_CENTER_MULTISAMPLE_PATTERN", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1014 | ]) |
| 1015 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1016 | D3D11_DEVICE_CONTEXT_TYPE = Enum("D3D11_DEVICE_CONTEXT_TYPE", [ |
| 1017 | "D3D11_DEVICE_CONTEXT_IMMEDIATE", |
| 1018 | "D3D11_DEVICE_CONTEXT_DEFERRED", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1019 | ]) |
| 1020 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1021 | D3D11_CLASS_INSTANCE_DESC = Struct("D3D11_CLASS_INSTANCE_DESC", [ |
| 1022 | (UINT, "InstanceId"), |
| 1023 | (UINT, "InstanceIndex"), |
| 1024 | (UINT, "TypeId"), |
| 1025 | (UINT, "ConstantBuffer"), |
| 1026 | (UINT, "BaseConstantBufferOffset"), |
| 1027 | (UINT, "BaseTexture"), |
| 1028 | (UINT, "BaseSampler"), |
| 1029 | (BOOL, "Created"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1030 | ]) |
| 1031 | |
| 1032 | |
| 1033 | ID3D11ClassInstance.methods += [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1034 | StdMethod(Void, "GetClassLinkage", [Out(Pointer(ObjPointer(ID3D11ClassLinkage)), "ppLinkage")]), |
José Fonseca | bc10e45 | 2012-11-08 10:24:45 +0000 | [diff] [blame] | 1035 | StdMethod(Void, "GetDesc", [Out(Pointer(D3D11_CLASS_INSTANCE_DESC), "pDesc")], sideeffects=False), |
| 1036 | StdMethod(Void, "GetInstanceName", [Out(LPSTR, "pInstanceName"), Out(Pointer(SIZE_T), "pBufferLength")], sideeffects=False), |
| 1037 | StdMethod(Void, "GetTypeName", [Out(LPSTR, "pTypeName"), Out(Pointer(SIZE_T), "pBufferLength")], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1038 | ] |
| 1039 | |
| 1040 | ID3D11ClassLinkage.methods += [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1041 | StdMethod(HRESULT, "GetClassInstance", [(LPCSTR, "pClassInstanceName"), (UINT, "InstanceIndex"), Out(Pointer(ObjPointer(ID3D11ClassInstance)), "ppInstance")]), |
| 1042 | StdMethod(HRESULT, "CreateClassInstance", [(LPCSTR, "pClassTypeName"), (UINT, "ConstantBufferOffset"), (UINT, "ConstantVectorOffset"), (UINT, "TextureOffset"), (UINT, "SamplerOffset"), Out(Pointer(ObjPointer(ID3D11ClassInstance)), "ppInstance")]), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1043 | ] |
| 1044 | |
| 1045 | ID3D11CommandList.methods += [ |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 1046 | StdMethod(UINT, "GetContextFlags", [], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1047 | ] |
| 1048 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1049 | D3D11_FEATURE_DATA_THREADING = Struct("D3D11_FEATURE_DATA_THREADING", [ |
| 1050 | (BOOL, "DriverConcurrentCreates"), |
| 1051 | (BOOL, "DriverCommandLists"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1052 | ]) |
| 1053 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1054 | D3D11_FEATURE_DATA_DOUBLES = Struct("D3D11_FEATURE_DATA_DOUBLES", [ |
| 1055 | (BOOL, "DoublePrecisionFloatShaderOps"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1056 | ]) |
| 1057 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1058 | D3D11_FEATURE_DATA_FORMAT_SUPPORT = Struct("D3D11_FEATURE_DATA_FORMAT_SUPPORT", [ |
| 1059 | (DXGI_FORMAT, "InFormat"), |
| 1060 | (D3D11_FORMAT_SUPPORT, "OutFormatSupport"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1061 | ]) |
| 1062 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1063 | D3D11_FEATURE_DATA_FORMAT_SUPPORT2 = Struct("D3D11_FEATURE_DATA_FORMAT_SUPPORT2", [ |
| 1064 | (DXGI_FORMAT, "InFormat"), |
| 1065 | (D3D11_FORMAT_SUPPORT2, "OutFormatSupport2"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1066 | ]) |
| 1067 | |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1068 | D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS = Struct("D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS", [ |
| 1069 | (BOOL, "ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x"), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1070 | ]) |
| 1071 | |
José Fonseca | 9a8d0cf | 2014-10-03 15:38:14 +0100 | [diff] [blame] | 1072 | D3D11_FEATURE_DATA_D3D11_OPTIONS = Struct("D3D11_FEATURE_DATA_D3D11_OPTIONS", [ |
| 1073 | (BOOL, "OutputMergerLogicOp"), |
| 1074 | (BOOL, "UAVOnlyRenderingForcedSampleCount"), |
| 1075 | (BOOL, "DiscardAPIsSeenByDriver"), |
| 1076 | (BOOL, "FlagsForUpdateAndCopySeenByDriver"), |
| 1077 | (BOOL, "ClearView"), |
| 1078 | (BOOL, "CopyWithOverlap"), |
| 1079 | (BOOL, "ConstantBufferPartialUpdate"), |
| 1080 | (BOOL, "ConstantBufferOffsetting"), |
| 1081 | (BOOL, "MapNoOverwriteOnDynamicConstantBuffer"), |
| 1082 | (BOOL, "MapNoOverwriteOnDynamicBufferSRV"), |
| 1083 | (BOOL, "MultisampleRTVWithForcedSampleCountOne"), |
| 1084 | (BOOL, "SAD4ShaderInstructions"), |
| 1085 | (BOOL, "ExtendedDoublesShaderInstructions"), |
| 1086 | (BOOL, "ExtendedResourceSharing"), |
| 1087 | ]) |
| 1088 | |
| 1089 | D3D11_FEATURE_DATA_ARCHITECTURE_INFO = Struct("D3D11_FEATURE_DATA_ARCHITECTURE_INFO", [ |
| 1090 | (BOOL, "TileBasedDeferredRenderer"), |
| 1091 | ]) |
| 1092 | |
| 1093 | D3D11_FEATURE_DATA_D3D9_OPTIONS = Struct("D3D11_FEATURE_DATA_D3D9_OPTIONS", [ |
| 1094 | (BOOL, "FullNonPow2TextureSupport"), |
| 1095 | ]) |
| 1096 | |
| 1097 | D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT = Struct("D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT", [ |
| 1098 | (BOOL, "SupportsDepthAsTextureWithLessEqualComparisonFilter"), |
| 1099 | ]) |
| 1100 | |
| 1101 | D3D11_SHADER_MIN_PRECISION_SUPPORT = Enum("D3D11_SHADER_MIN_PRECISION_SUPPORT", [ |
| 1102 | "D3D11_SHADER_MIN_PRECISION_10_BIT", |
| 1103 | "D3D11_SHADER_MIN_PRECISION_16_BIT", |
| 1104 | ]) |
| 1105 | |
| 1106 | D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT = Struct("D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT", [ |
| 1107 | (UINT, "PixelShaderMinPrecision"), |
| 1108 | (UINT, "AllOtherShaderStagesMinPrecision"), |
| 1109 | ]) |
| 1110 | |
| 1111 | D3D11_TILED_RESOURCES_TIER = Enum("D3D11_TILED_RESOURCES_TIER", [ |
| 1112 | "D3D11_TILED_RESOURCES_NOT_SUPPORTED", |
| 1113 | "D3D11_TILED_RESOURCES_TIER_1", |
| 1114 | "D3D11_TILED_RESOURCES_TIER_2", |
| 1115 | ]) |
| 1116 | |
| 1117 | D3D11_FEATURE_DATA_D3D11_OPTIONS1 = Struct("D3D11_FEATURE_DATA_D3D11_OPTIONS1", [ |
| 1118 | (D3D11_TILED_RESOURCES_TIER, "TiledResourcesTier"), |
| 1119 | (BOOL, "MinMaxFiltering"), |
| 1120 | (BOOL, "ClearViewAlsoSupportsDepthOnlyFormats"), |
| 1121 | (BOOL, "MapOnDefaultBuffers"), |
| 1122 | ]) |
| 1123 | |
| 1124 | D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT = Struct("D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT", [ |
| 1125 | (BOOL, "SimpleInstancingSupported"), |
| 1126 | ]) |
| 1127 | |
| 1128 | D3D11_FEATURE_DATA_MARKER_SUPPORT = Struct("D3D11_FEATURE_DATA_MARKER_SUPPORT", [ |
| 1129 | (BOOL, "Profile"), |
| 1130 | ]) |
| 1131 | |
| 1132 | D3D11_FEATURE_DATA_D3D9_OPTIONS1 = Struct("D3D11_FEATURE_DATA_D3D9_OPTIONS1", [ |
| 1133 | (BOOL, "FullNonPow2TextureSupported"), |
| 1134 | (BOOL, "DepthAsTextureWithLessEqualComparisonFilterSupported"), |
| 1135 | (BOOL, "SimpleInstancingSupported"), |
| 1136 | (BOOL, "TextureCubeFaceRenderTargetWithNonCubeDepthStencilSupported"), |
| 1137 | ]) |
| 1138 | |
José Fonseca | b95e372 | 2012-04-16 14:01:15 +0100 | [diff] [blame] | 1139 | D3D11_FEATURE, D3D11_FEATURE_DATA = EnumPolymorphic("D3D11_FEATURE", "Feature", [ |
| 1140 | ("D3D11_FEATURE_THREADING", Pointer(D3D11_FEATURE_DATA_THREADING)), |
| 1141 | ("D3D11_FEATURE_DOUBLES", Pointer(D3D11_FEATURE_DATA_DOUBLES)), |
| 1142 | ("D3D11_FEATURE_FORMAT_SUPPORT", Pointer(D3D11_FEATURE_DATA_FORMAT_SUPPORT)), |
| 1143 | ("D3D11_FEATURE_FORMAT_SUPPORT2", Pointer(D3D11_FEATURE_DATA_FORMAT_SUPPORT2)), |
| 1144 | ("D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS", Pointer(D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS)), |
José Fonseca | 9a8d0cf | 2014-10-03 15:38:14 +0100 | [diff] [blame] | 1145 | ("D3D11_FEATURE_D3D11_OPTIONS", Pointer(D3D11_FEATURE_DATA_D3D11_OPTIONS)), |
| 1146 | ("D3D11_FEATURE_ARCHITECTURE_INFO", Pointer(D3D11_FEATURE_DATA_ARCHITECTURE_INFO)), |
| 1147 | ("D3D11_FEATURE_D3D9_OPTIONS", Pointer(D3D11_FEATURE_DATA_D3D9_OPTIONS)), |
| 1148 | ("D3D11_FEATURE_SHADER_MIN_PRECISION_SUPPORT", Pointer(D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT)), |
| 1149 | ("D3D11_FEATURE_D3D9_SHADOW_SUPPORT", Pointer(D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT)), |
| 1150 | ("D3D11_FEATURE_D3D11_OPTIONS1", Pointer(D3D11_FEATURE_DATA_D3D11_OPTIONS1)), |
| 1151 | ("D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT", Pointer(D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT)), |
| 1152 | ("D3D11_FEATURE_MARKER_SUPPORT", Pointer(D3D11_FEATURE_DATA_MARKER_SUPPORT)), |
| 1153 | ("D3D11_FEATURE_D3D9_OPTIONS1", Pointer(D3D11_FEATURE_DATA_D3D9_OPTIONS1)), |
José Fonseca | b95e372 | 2012-04-16 14:01:15 +0100 | [diff] [blame] | 1154 | ], Blob(Void, "FeatureSupportDataSize"), False) |
| 1155 | |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1156 | ID3D11DeviceContext.methods += [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1157 | StdMethod(Void, "VSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppConstantBuffers")]), |
| 1158 | StdMethod(Void, "PSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]), |
| 1159 | StdMethod(Void, "PSSetShader", [(ObjPointer(ID3D11PixelShader), "pPixelShader"), (Array(Const(ObjPointer(ID3D11ClassInstance)), "NumClassInstances"), "ppClassInstances"), (UINT, "NumClassInstances")]), |
| 1160 | StdMethod(Void, "PSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D11SamplerState)), "NumSamplers"), "ppSamplers")]), |
| 1161 | StdMethod(Void, "VSSetShader", [(ObjPointer(ID3D11VertexShader), "pVertexShader"), (Array(Const(ObjPointer(ID3D11ClassInstance)), "NumClassInstances"), "ppClassInstances"), (UINT, "NumClassInstances")]), |
| 1162 | StdMethod(Void, "DrawIndexed", [(UINT, "IndexCount"), (UINT, "StartIndexLocation"), (INT, "BaseVertexLocation")]), |
| 1163 | StdMethod(Void, "Draw", [(UINT, "VertexCount"), (UINT, "StartVertexLocation")]), |
| 1164 | StdMethod(HRESULT, "Map", [(ObjPointer(ID3D11Resource), "pResource"), (UINT, "Subresource"), (D3D11_MAP, "MapType"), (D3D11_MAP_FLAG, "MapFlags"), Out(Pointer(D3D11_MAPPED_SUBRESOURCE), "pMappedResource")]), |
| 1165 | StdMethod(Void, "Unmap", [(ObjPointer(ID3D11Resource), "pResource"), (UINT, "Subresource")]), |
| 1166 | StdMethod(Void, "PSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppConstantBuffers")]), |
| 1167 | StdMethod(Void, "IASetInputLayout", [(ObjPointer(ID3D11InputLayout), "pInputLayout")]), |
José Fonseca | 9243aa6 | 2012-11-16 19:13:20 +0000 | [diff] [blame] | 1168 | StdMethod(Void, "IASetVertexBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppVertexBuffers"), (Array(Const(UINT), "NumBuffers"), "pStrides"), (Array(Const(UINT), "NumBuffers"), "pOffsets")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1169 | StdMethod(Void, "IASetIndexBuffer", [(ObjPointer(ID3D11Buffer), "pIndexBuffer"), (DXGI_FORMAT, "Format"), (UINT, "Offset")]), |
| 1170 | StdMethod(Void, "DrawIndexedInstanced", [(UINT, "IndexCountPerInstance"), (UINT, "InstanceCount"), (UINT, "StartIndexLocation"), (INT, "BaseVertexLocation"), (UINT, "StartInstanceLocation")]), |
| 1171 | StdMethod(Void, "DrawInstanced", [(UINT, "VertexCountPerInstance"), (UINT, "InstanceCount"), (UINT, "StartVertexLocation"), (UINT, "StartInstanceLocation")]), |
| 1172 | StdMethod(Void, "GSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppConstantBuffers")]), |
| 1173 | StdMethod(Void, "GSSetShader", [(ObjPointer(ID3D11GeometryShader), "pShader"), (Array(Const(ObjPointer(ID3D11ClassInstance)), "NumClassInstances"), "ppClassInstances"), (UINT, "NumClassInstances")]), |
| 1174 | StdMethod(Void, "IASetPrimitiveTopology", [(D3D11_PRIMITIVE_TOPOLOGY, "Topology")]), |
| 1175 | StdMethod(Void, "VSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]), |
| 1176 | StdMethod(Void, "VSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D11SamplerState)), "NumSamplers"), "ppSamplers")]), |
| 1177 | StdMethod(Void, "Begin", [(ObjPointer(ID3D11Asynchronous), "pAsync")]), |
| 1178 | StdMethod(Void, "End", [(ObjPointer(ID3D11Asynchronous), "pAsync")]), |
José Fonseca | dbc46f0 | 2014-08-15 17:04:17 +0100 | [diff] [blame] | 1179 | StdMethod(HRESULT, "GetData", [(ObjPointer(ID3D11Asynchronous), "pAsync"), Out(D3D11_QUERY_DATA, "pData"), (UINT, "DataSize"), (D3D11_ASYNC_GETDATA_FLAG, "GetDataFlags")], sideeffects=False), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1180 | StdMethod(Void, "SetPredication", [(ObjPointer(ID3D11Predicate), "pPredicate"), (BOOL, "PredicateValue")]), |
| 1181 | StdMethod(Void, "GSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]), |
| 1182 | StdMethod(Void, "GSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D11SamplerState)), "NumSamplers"), "ppSamplers")]), |
| 1183 | StdMethod(Void, "OMSetRenderTargets", [(UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11RenderTargetView)), "NumViews"), "ppRenderTargetViews"), (ObjPointer(ID3D11DepthStencilView), "pDepthStencilView")]), |
José Fonseca | 9243aa6 | 2012-11-16 19:13:20 +0000 | [diff] [blame] | 1184 | StdMethod(Void, "OMSetRenderTargetsAndUnorderedAccessViews", [(UINT, "NumRTVs"), (Array(Const(ObjPointer(ID3D11RenderTargetView)), "NumRTVs"), "ppRenderTargetViews"), (ObjPointer(ID3D11DepthStencilView), "pDepthStencilView"), (UINT, "UAVStartSlot"), (UINT, "NumUAVs"), (Array(Const(ObjPointer(ID3D11UnorderedAccessView)), "NumUAVs"), "ppUnorderedAccessViews"), (Array(Const(UINT), "NumUAVs"), "pUAVInitialCounts")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1185 | StdMethod(Void, "OMSetBlendState", [(ObjPointer(ID3D11BlendState), "pBlendState"), (Array(Const(FLOAT), 4), "BlendFactor"), (UINT, "SampleMask")]), |
| 1186 | StdMethod(Void, "OMSetDepthStencilState", [(ObjPointer(ID3D11DepthStencilState), "pDepthStencilState"), (UINT, "StencilRef")]), |
José Fonseca | 9243aa6 | 2012-11-16 19:13:20 +0000 | [diff] [blame] | 1187 | StdMethod(Void, "SOSetTargets", [(UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppSOTargets"), (Array(Const(UINT), "NumBuffers"), "pOffsets")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1188 | StdMethod(Void, "DrawAuto", []), |
| 1189 | StdMethod(Void, "DrawIndexedInstancedIndirect", [(ObjPointer(ID3D11Buffer), "pBufferForArgs"), (UINT, "AlignedByteOffsetForArgs")]), |
| 1190 | StdMethod(Void, "DrawInstancedIndirect", [(ObjPointer(ID3D11Buffer), "pBufferForArgs"), (UINT, "AlignedByteOffsetForArgs")]), |
| 1191 | StdMethod(Void, "Dispatch", [(UINT, "ThreadGroupCountX"), (UINT, "ThreadGroupCountY"), (UINT, "ThreadGroupCountZ")]), |
| 1192 | StdMethod(Void, "DispatchIndirect", [(ObjPointer(ID3D11Buffer), "pBufferForArgs"), (UINT, "AlignedByteOffsetForArgs")]), |
| 1193 | StdMethod(Void, "RSSetState", [(ObjPointer(ID3D11RasterizerState), "pRasterizerState")]), |
| 1194 | StdMethod(Void, "RSSetViewports", [(UINT, "NumViewports"), (Array(Const(D3D11_VIEWPORT), "NumViewports"), "pViewports")]), |
| 1195 | StdMethod(Void, "RSSetScissorRects", [(UINT, "NumRects"), (Array(Const(D3D11_RECT), "NumRects"), "pRects")]), |
| 1196 | StdMethod(Void, "CopySubresourceRegion", [(ObjPointer(ID3D11Resource), "pDstResource"), (UINT, "DstSubresource"), (UINT, "DstX"), (UINT, "DstY"), (UINT, "DstZ"), (ObjPointer(ID3D11Resource), "pSrcResource"), (UINT, "SrcSubresource"), (Pointer(Const(D3D11_BOX)), "pSrcBox")]), |
| 1197 | StdMethod(Void, "CopyResource", [(ObjPointer(ID3D11Resource), "pDstResource"), (ObjPointer(ID3D11Resource), "pSrcResource")]), |
José Fonseca | cc9abd7 | 2012-11-08 10:47:18 +0000 | [diff] [blame] | 1198 | StdMethod(Void, "UpdateSubresource", [(ObjPointer(ID3D11Resource), "pDstResource"), (UINT, "DstSubresource"), (Pointer(Const(D3D11_BOX)), "pDstBox"), (Blob(Const(Void), "_calcSubresourceSize(pDstResource, DstSubresource, pDstBox, SrcRowPitch, SrcDepthPitch)"), "pSrcData"), (UINT, "SrcRowPitch"), (UINT, "SrcDepthPitch")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1199 | StdMethod(Void, "CopyStructureCount", [(ObjPointer(ID3D11Buffer), "pDstBuffer"), (UINT, "DstAlignedByteOffset"), (ObjPointer(ID3D11UnorderedAccessView), "pSrcView")]), |
| 1200 | StdMethod(Void, "ClearRenderTargetView", [(ObjPointer(ID3D11RenderTargetView), "pRenderTargetView"), (Array(Const(FLOAT), 4), "ColorRGBA")]), |
| 1201 | StdMethod(Void, "ClearUnorderedAccessViewUint", [(ObjPointer(ID3D11UnorderedAccessView), "pUnorderedAccessView"), (Array(Const(UINT), 4), "Values")]), |
| 1202 | StdMethod(Void, "ClearUnorderedAccessViewFloat", [(ObjPointer(ID3D11UnorderedAccessView), "pUnorderedAccessView"), (Array(Const(FLOAT), 4), "Values")]), |
| 1203 | StdMethod(Void, "ClearDepthStencilView", [(ObjPointer(ID3D11DepthStencilView), "pDepthStencilView"), (D3D11_CLEAR_FLAG, "ClearFlags"), (FLOAT, "Depth"), (UINT8, "Stencil")]), |
| 1204 | StdMethod(Void, "GenerateMips", [(ObjPointer(ID3D11ShaderResourceView), "pShaderResourceView")]), |
| 1205 | StdMethod(Void, "SetResourceMinLOD", [(ObjPointer(ID3D11Resource), "pResource"), (FLOAT, "MinLOD")]), |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 1206 | StdMethod(FLOAT, "GetResourceMinLOD", [(ObjPointer(ID3D11Resource), "pResource")], sideeffects=False), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1207 | StdMethod(Void, "ResolveSubresource", [(ObjPointer(ID3D11Resource), "pDstResource"), (UINT, "DstSubresource"), (ObjPointer(ID3D11Resource), "pSrcResource"), (UINT, "SrcSubresource"), (DXGI_FORMAT, "Format")]), |
| 1208 | StdMethod(Void, "ExecuteCommandList", [(ObjPointer(ID3D11CommandList), "pCommandList"), (BOOL, "RestoreContextState")]), |
| 1209 | StdMethod(Void, "HSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]), |
| 1210 | StdMethod(Void, "HSSetShader", [(ObjPointer(ID3D11HullShader), "pHullShader"), (Array(Const(ObjPointer(ID3D11ClassInstance)), "NumClassInstances"), "ppClassInstances"), (UINT, "NumClassInstances")]), |
| 1211 | StdMethod(Void, "HSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D11SamplerState)), "NumSamplers"), "ppSamplers")]), |
| 1212 | StdMethod(Void, "HSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppConstantBuffers")]), |
| 1213 | StdMethod(Void, "DSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]), |
| 1214 | StdMethod(Void, "DSSetShader", [(ObjPointer(ID3D11DomainShader), "pDomainShader"), (Array(Const(ObjPointer(ID3D11ClassInstance)), "NumClassInstances"), "ppClassInstances"), (UINT, "NumClassInstances")]), |
| 1215 | StdMethod(Void, "DSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D11SamplerState)), "NumSamplers"), "ppSamplers")]), |
| 1216 | StdMethod(Void, "DSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppConstantBuffers")]), |
| 1217 | StdMethod(Void, "CSSetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), (Array(Const(ObjPointer(ID3D11ShaderResourceView)), "NumViews"), "ppShaderResourceViews")]), |
José Fonseca | 9243aa6 | 2012-11-16 19:13:20 +0000 | [diff] [blame] | 1218 | StdMethod(Void, "CSSetUnorderedAccessViews", [(UINT, "StartSlot"), (UINT, "NumUAVs"), (Array(Const(ObjPointer(ID3D11UnorderedAccessView)), "NumUAVs"), "ppUnorderedAccessViews"), (Array(Const(UINT), "NumUAVs"), "pUAVInitialCounts")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1219 | StdMethod(Void, "CSSetShader", [(ObjPointer(ID3D11ComputeShader), "pComputeShader"), (Array(Const(ObjPointer(ID3D11ClassInstance)), "NumClassInstances"), "ppClassInstances"), (UINT, "NumClassInstances")]), |
| 1220 | StdMethod(Void, "CSSetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), (Array(Const(ObjPointer(ID3D11SamplerState)), "NumSamplers"), "ppSamplers")]), |
| 1221 | StdMethod(Void, "CSSetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), (Array(Const(ObjPointer(ID3D11Buffer)), "NumBuffers"), "ppConstantBuffers")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1222 | StdMethod(Void, "VSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppConstantBuffers")]), |
| 1223 | StdMethod(Void, "PSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D11ShaderResourceView), "NumViews"), "ppShaderResourceViews")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1224 | StdMethod(Void, "PSGetShader", [Out(Pointer(ObjPointer(ID3D11PixelShader)), "ppPixelShader"), Out(Array(ObjPointer(ID3D11ClassInstance), "*pNumClassInstances"), "ppClassInstances"), InOut(Pointer(UINT), "pNumClassInstances")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1225 | StdMethod(Void, "PSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D11SamplerState), "NumSamplers"), "ppSamplers")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1226 | StdMethod(Void, "VSGetShader", [Out(Pointer(ObjPointer(ID3D11VertexShader)), "ppVertexShader"), Out(Array(ObjPointer(ID3D11ClassInstance), "*pNumClassInstances"), "ppClassInstances"), InOut(Pointer(UINT), "pNumClassInstances")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1227 | StdMethod(Void, "PSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppConstantBuffers")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1228 | StdMethod(Void, "IAGetInputLayout", [Out(Pointer(ObjPointer(ID3D11InputLayout)), "ppInputLayout")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1229 | StdMethod(Void, "IAGetVertexBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppVertexBuffers"), Out(Array(UINT, "NumBuffers"), "pStrides"), Out(Array(UINT, "NumBuffers"), "pOffsets")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1230 | StdMethod(Void, "IAGetIndexBuffer", [Out(Pointer(ObjPointer(ID3D11Buffer)), "pIndexBuffer"), Out(Pointer(DXGI_FORMAT), "Format"), Out(Pointer(UINT), "Offset")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1231 | StdMethod(Void, "GSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppConstantBuffers")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1232 | StdMethod(Void, "GSGetShader", [Out(Pointer(ObjPointer(ID3D11GeometryShader)), "ppGeometryShader"), Out(Array(ObjPointer(ID3D11ClassInstance), "*pNumClassInstances"), "ppClassInstances"), InOut(Pointer(UINT), "pNumClassInstances")]), |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 1233 | StdMethod(Void, "IAGetPrimitiveTopology", [Out(Pointer(D3D11_PRIMITIVE_TOPOLOGY), "pTopology")], sideeffects=False), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1234 | StdMethod(Void, "VSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D11ShaderResourceView), "NumViews"), "ppShaderResourceViews")]), |
| 1235 | StdMethod(Void, "VSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D11SamplerState), "NumSamplers"), "ppSamplers")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1236 | StdMethod(Void, "GetPredication", [Out(Pointer(ObjPointer(ID3D11Predicate)), "ppPredicate"), Out(Pointer(BOOL), "pPredicateValue")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1237 | StdMethod(Void, "GSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D11ShaderResourceView), "NumViews"), "ppShaderResourceViews")]), |
| 1238 | StdMethod(Void, "GSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D11SamplerState), "NumSamplers"), "ppSamplers")]), |
| 1239 | StdMethod(Void, "OMGetRenderTargets", [(UINT, "NumViews"), Out(Array(ObjPointer(ID3D11RenderTargetView), "NumViews"), "ppRenderTargetViews"), Out(Pointer(ObjPointer(ID3D11DepthStencilView)), "ppDepthStencilView")]), |
| 1240 | StdMethod(Void, "OMGetRenderTargetsAndUnorderedAccessViews", [(UINT, "NumRTVs"), Out(Array(ObjPointer(ID3D11RenderTargetView), "NumRTVs"), "ppRenderTargetViews"), Out(Pointer(ObjPointer(ID3D11DepthStencilView)), "ppDepthStencilView"), (UINT, "UAVStartSlot"), (UINT, "NumUAVs"), Out(Array(ObjPointer(ID3D11UnorderedAccessView), "NumUAVs"), "ppUnorderedAccessViews")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1241 | StdMethod(Void, "OMGetBlendState", [Out(Pointer(ObjPointer(ID3D11BlendState)), "ppBlendState"), Out(Array(FLOAT, 4), "BlendFactor"), Out(Pointer(UINT), "pSampleMask")]), |
| 1242 | StdMethod(Void, "OMGetDepthStencilState", [Out(Pointer(ObjPointer(ID3D11DepthStencilState)), "ppDepthStencilState"), Out(Pointer(UINT), "pStencilRef")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1243 | StdMethod(Void, "SOGetTargets", [(UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppSOTargets")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1244 | StdMethod(Void, "RSGetState", [Out(Pointer(ObjPointer(ID3D11RasterizerState)), "ppRasterizerState")]), |
José Fonseca | 00b9aba | 2014-08-13 13:18:48 +0100 | [diff] [blame] | 1245 | StdMethod(Void, "RSGetViewports", [InOut(Pointer(UINT), "pNumViewports"), Out(Array(D3D11_VIEWPORT, "*pNumViewports"), "pViewports")], sideeffects=False), |
| 1246 | StdMethod(Void, "RSGetScissorRects", [InOut(Pointer(UINT), "pNumRects"), Out(Array(D3D11_RECT, "*pNumRects"), "pRects")], sideeffects=False), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1247 | StdMethod(Void, "HSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D11ShaderResourceView), "NumViews"), "ppShaderResourceViews")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1248 | StdMethod(Void, "HSGetShader", [Out(Pointer(ObjPointer(ID3D11HullShader)), "ppHullShader"), Out(Array(ObjPointer(ID3D11ClassInstance), "*pNumClassInstances"), "ppClassInstances"), InOut(Pointer(UINT), "pNumClassInstances")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1249 | StdMethod(Void, "HSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D11SamplerState), "NumSamplers"), "ppSamplers")]), |
| 1250 | StdMethod(Void, "HSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppConstantBuffers")]), |
| 1251 | StdMethod(Void, "DSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D11ShaderResourceView), "NumViews"), "ppShaderResourceViews")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1252 | StdMethod(Void, "DSGetShader", [Out(Pointer(ObjPointer(ID3D11DomainShader)), "ppDomainShader"), Out(Array(ObjPointer(ID3D11ClassInstance), "*pNumClassInstances"), "ppClassInstances"), InOut(Pointer(UINT), "pNumClassInstances")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1253 | StdMethod(Void, "DSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D11SamplerState), "NumSamplers"), "ppSamplers")]), |
| 1254 | StdMethod(Void, "DSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppConstantBuffers")]), |
| 1255 | StdMethod(Void, "CSGetShaderResources", [(UINT, "StartSlot"), (UINT, "NumViews"), Out(Array(ObjPointer(ID3D11ShaderResourceView), "NumViews"), "ppShaderResourceViews")]), |
| 1256 | StdMethod(Void, "CSGetUnorderedAccessViews", [(UINT, "StartSlot"), (UINT, "NumUAVs"), Out(Array(ObjPointer(ID3D11UnorderedAccessView), "NumUAVs"), "ppUnorderedAccessViews")]), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1257 | StdMethod(Void, "CSGetShader", [Out(Pointer(ObjPointer(ID3D11ComputeShader)), "ppComputeShader"), Out(Array(ObjPointer(ID3D11ClassInstance), "*pNumClassInstances"), "ppClassInstances"), InOut(Pointer(UINT), "pNumClassInstances")]), |
José Fonseca | 8ce19e4 | 2012-11-21 21:01:05 +0000 | [diff] [blame] | 1258 | StdMethod(Void, "CSGetSamplers", [(UINT, "StartSlot"), (UINT, "NumSamplers"), Out(Array(ObjPointer(ID3D11SamplerState), "NumSamplers"), "ppSamplers")]), |
| 1259 | StdMethod(Void, "CSGetConstantBuffers", [(UINT, "StartSlot"), (UINT, "NumBuffers"), Out(Array(ObjPointer(ID3D11Buffer), "NumBuffers"), "ppConstantBuffers")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1260 | StdMethod(Void, "ClearState", []), |
| 1261 | StdMethod(Void, "Flush", []), |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 1262 | StdMethod(D3D11_DEVICE_CONTEXT_TYPE, "GetType", [], sideeffects=False), |
| 1263 | StdMethod(UINT, "GetContextFlags", [], sideeffects=False), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1264 | StdMethod(HRESULT, "FinishCommandList", [(BOOL, "RestoreDeferredContextState"), Out(Pointer(ObjPointer(ID3D11CommandList)), "ppCommandList")]), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1265 | ] |
| 1266 | |
| 1267 | D3D11_CREATE_DEVICE_FLAG = Flags(UINT, [ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1268 | "D3D11_CREATE_DEVICE_SINGLETHREADED", |
| 1269 | "D3D11_CREATE_DEVICE_DEBUG", |
| 1270 | "D3D11_CREATE_DEVICE_SWITCH_TO_REF", |
| 1271 | "D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS", |
| 1272 | "D3D11_CREATE_DEVICE_BGRA_SUPPORT", |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1273 | ]) |
| 1274 | |
| 1275 | ID3D11Device.methods += [ |
José Fonseca | 8f6e0e3 | 2012-11-07 19:22:20 +0000 | [diff] [blame] | 1276 | StdMethod(HRESULT, "CreateBuffer", [(Pointer(Const(D3D11_BUFFER_DESC)), "pDesc"), (Array(Const(D3D11_SUBRESOURCE_DATA), "1"), "pInitialData"), Out(Pointer(ObjPointer(ID3D11Buffer)), "ppBuffer")]), |
| 1277 | StdMethod(HRESULT, "CreateTexture1D", [(Pointer(Const(D3D11_TEXTURE1D_DESC)), "pDesc"), (Array(Const(D3D11_SUBRESOURCE_DATA), "_getNumSubResources(pDesc)"), "pInitialData"), Out(Pointer(ObjPointer(ID3D11Texture1D)), "ppTexture1D")]), |
| 1278 | StdMethod(HRESULT, "CreateTexture2D", [(Pointer(Const(D3D11_TEXTURE2D_DESC)), "pDesc"), (Array(Const(D3D11_SUBRESOURCE_DATA), "_getNumSubResources(pDesc)"), "pInitialData"), Out(Pointer(ObjPointer(ID3D11Texture2D)), "ppTexture2D")]), |
| 1279 | StdMethod(HRESULT, "CreateTexture3D", [(Pointer(Const(D3D11_TEXTURE3D_DESC)), "pDesc"), (Array(Const(D3D11_SUBRESOURCE_DATA), "_getNumSubResources(pDesc)"), "pInitialData"), Out(Pointer(ObjPointer(ID3D11Texture3D)), "ppTexture3D")]), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1280 | StdMethod(HRESULT, "CreateShaderResourceView", [(ObjPointer(ID3D11Resource), "pResource"), (Pointer(Const(D3D11_SHADER_RESOURCE_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D11ShaderResourceView)), "ppSRView")]), |
| 1281 | StdMethod(HRESULT, "CreateUnorderedAccessView", [(ObjPointer(ID3D11Resource), "pResource"), (Pointer(Const(D3D11_UNORDERED_ACCESS_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D11UnorderedAccessView)), "ppUAView")]), |
| 1282 | StdMethod(HRESULT, "CreateRenderTargetView", [(ObjPointer(ID3D11Resource), "pResource"), (Pointer(Const(D3D11_RENDER_TARGET_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D11RenderTargetView)), "ppRTView")]), |
| 1283 | StdMethod(HRESULT, "CreateDepthStencilView", [(ObjPointer(ID3D11Resource), "pResource"), (Pointer(Const(D3D11_DEPTH_STENCIL_VIEW_DESC)), "pDesc"), Out(Pointer(ObjPointer(ID3D11DepthStencilView)), "ppDepthStencilView")]), |
| 1284 | StdMethod(HRESULT, "CreateInputLayout", [(Array(Const(D3D11_INPUT_ELEMENT_DESC), "NumElements"), "pInputElementDescs"), (UINT, "NumElements"), (Blob(Const(Void), "BytecodeLength"), "pShaderBytecodeWithInputSignature"), (SIZE_T, "BytecodeLength"), Out(Pointer(ObjPointer(ID3D11InputLayout)), "ppInputLayout")]), |
| 1285 | StdMethod(HRESULT, "CreateVertexShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11VertexShader)), "ppVertexShader")]), |
| 1286 | StdMethod(HRESULT, "CreateGeometryShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11GeometryShader)), "ppGeometryShader")]), |
| 1287 | StdMethod(HRESULT, "CreateGeometryShaderWithStreamOutput", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (Array(Const(D3D11_SO_DECLARATION_ENTRY), "NumEntries"), "pSODeclaration"), (UINT, "NumEntries"), (Array(Const(UINT), "NumStrides"), "pBufferStrides"), (UINT, "NumStrides"), (UINT, "RasterizedStream"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11GeometryShader)), "ppGeometryShader")]), |
| 1288 | StdMethod(HRESULT, "CreatePixelShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11PixelShader)), "ppPixelShader")]), |
| 1289 | StdMethod(HRESULT, "CreateHullShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11HullShader)), "ppHullShader")]), |
| 1290 | StdMethod(HRESULT, "CreateDomainShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11DomainShader)), "ppDomainShader")]), |
| 1291 | StdMethod(HRESULT, "CreateComputeShader", [(Blob(Const(Void), "BytecodeLength"), "pShaderBytecode"), (SIZE_T, "BytecodeLength"), (ObjPointer(ID3D11ClassLinkage), "pClassLinkage"), Out(Pointer(ObjPointer(ID3D11ComputeShader)), "ppComputeShader")]), |
| 1292 | StdMethod(HRESULT, "CreateClassLinkage", [Out(Pointer(ObjPointer(ID3D11ClassLinkage)), "ppLinkage")]), |
| 1293 | StdMethod(HRESULT, "CreateBlendState", [(Pointer(Const(D3D11_BLEND_DESC)), "pBlendStateDesc"), Out(Pointer(ObjPointer(ID3D11BlendState)), "ppBlendState")]), |
| 1294 | StdMethod(HRESULT, "CreateDepthStencilState", [(Pointer(Const(D3D11_DEPTH_STENCIL_DESC)), "pDepthStencilDesc"), Out(Pointer(ObjPointer(ID3D11DepthStencilState)), "ppDepthStencilState")]), |
| 1295 | StdMethod(HRESULT, "CreateRasterizerState", [(Pointer(Const(D3D11_RASTERIZER_DESC)), "pRasterizerDesc"), Out(Pointer(ObjPointer(ID3D11RasterizerState)), "ppRasterizerState")]), |
| 1296 | StdMethod(HRESULT, "CreateSamplerState", [(Pointer(Const(D3D11_SAMPLER_DESC)), "pSamplerDesc"), Out(Pointer(ObjPointer(ID3D11SamplerState)), "ppSamplerState")]), |
| 1297 | StdMethod(HRESULT, "CreateQuery", [(Pointer(Const(D3D11_QUERY_DESC)), "pQueryDesc"), Out(Pointer(ObjPointer(ID3D11Query)), "ppQuery")]), |
| 1298 | StdMethod(HRESULT, "CreatePredicate", [(Pointer(Const(D3D11_QUERY_DESC)), "pPredicateDesc"), Out(Pointer(ObjPointer(ID3D11Predicate)), "ppPredicate")]), |
| 1299 | StdMethod(HRESULT, "CreateCounter", [(Pointer(Const(D3D11_COUNTER_DESC)), "pCounterDesc"), Out(Pointer(ObjPointer(ID3D11Counter)), "ppCounter")]), |
| 1300 | StdMethod(HRESULT, "CreateDeferredContext", [(UINT, "ContextFlags"), Out(Pointer(ObjPointer(ID3D11DeviceContext)), "ppDeferredContext")]), |
| 1301 | StdMethod(HRESULT, "OpenSharedResource", [(HANDLE, "hResource"), (REFIID, "ReturnedInterface"), Out(Pointer(ObjPointer(Void)), "ppResource")]), |
José Fonseca | e088e5c | 2012-11-16 20:05:54 +0000 | [diff] [blame] | 1302 | StdMethod(HRESULT, "CheckFormatSupport", [(DXGI_FORMAT, "Format"), Out(Pointer(D3D11_FORMAT_SUPPORT), "pFormatSupport")], sideeffects=False), |
| 1303 | StdMethod(HRESULT, "CheckMultisampleQualityLevels", [(DXGI_FORMAT, "Format"), (UINT, "SampleCount"), Out(Pointer(UINT), "pNumQualityLevels")], sideeffects=False), |
| 1304 | StdMethod(Void, "CheckCounterInfo", [Out(Pointer(D3D11_COUNTER_INFO), "pCounterInfo")], sideeffects=False), |
José Fonseca | bc10e45 | 2012-11-08 10:24:45 +0000 | [diff] [blame] | 1305 | StdMethod(HRESULT, "CheckCounter", [(Pointer(Const(D3D11_COUNTER_DESC)), "pDesc"), Out(Pointer(D3D11_COUNTER_TYPE), "pType"), Out(Pointer(UINT), "pActiveCounters"), Out(LPSTR, "szName"), Out(Pointer(UINT), "pNameLength"), Out(LPSTR, "szUnits"), Out(Pointer(UINT), "pUnitsLength"), Out(LPSTR, "szDescription"), Out(Pointer(UINT), "pDescriptionLength")], sideeffects=False), |
| 1306 | StdMethod(HRESULT, "CheckFeatureSupport", [(D3D11_FEATURE, "Feature"), Out(D3D11_FEATURE_DATA, "pFeatureSupportData"), (UINT, "FeatureSupportDataSize")], sideeffects=False), |
José Fonseca | 9eec934 | 2014-10-03 22:24:50 +0100 | [diff] [blame^] | 1307 | StdMethod(HRESULT, "GetPrivateData", [(REFGUID, "guid"), InOut(Pointer(UINT), "pDataSize"), Out(OpaquePointer(Void), "pData")], sideeffects=False), |
José Fonseca | bc10e45 | 2012-11-08 10:24:45 +0000 | [diff] [blame] | 1308 | StdMethod(HRESULT, "SetPrivateData", [(REFGUID, "guid"), (UINT, "DataSize"), (OpaqueBlob(Const(Void), "DataSize"), "pData")], sideeffects=False), |
| 1309 | StdMethod(HRESULT, "SetPrivateDataInterface", [(REFGUID, "guid"), (OpaquePointer(Const(IUnknown)), "pData")], sideeffects=False), |
José Fonseca | 2b80745 | 2012-11-10 09:50:10 +0000 | [diff] [blame] | 1310 | StdMethod(D3D_FEATURE_LEVEL, "GetFeatureLevel", [], sideeffects=False), |
| 1311 | StdMethod(D3D11_CREATE_DEVICE_FLAG, "GetCreationFlags", [], sideeffects=False), |
| 1312 | StdMethod(HRESULT, "GetDeviceRemovedReason", [], sideeffects=False), |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1313 | StdMethod(Void, "GetImmediateContext", [Out(Pointer(ObjPointer(ID3D11DeviceContext)), "ppImmediateContext")]), |
| 1314 | StdMethod(HRESULT, "SetExceptionMode", [(D3D11_RAISE_FLAG, "RaiseFlags")]), |
José Fonseca | 5c05fdb | 2014-08-13 13:19:32 +0100 | [diff] [blame] | 1315 | StdMethod(D3D11_RAISE_FLAG, "GetExceptionMode", [], sideeffects=False), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1316 | ] |
| 1317 | |
José Fonseca | 8130193 | 2012-11-11 00:10:20 +0000 | [diff] [blame] | 1318 | d3d11 = Module("d3d11") |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1319 | |
| 1320 | d3d11.addFunctions([ |
José Fonseca | ee590be | 2012-04-16 13:25:06 +0100 | [diff] [blame] | 1321 | StdFunction(HRESULT, "D3D11CreateDevice", [(ObjPointer(IDXGIAdapter), "pAdapter"), (D3D_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (D3D11_CREATE_DEVICE_FLAG, "Flags"), (Array(Const(D3D_FEATURE_LEVEL), "FeatureLevels"), "pFeatureLevels"), (UINT, "FeatureLevels"), (UINT, "SDKVersion"), Out(Pointer(ObjPointer(ID3D11Device)), "ppDevice"), Out(Pointer(D3D_FEATURE_LEVEL), "pFeatureLevel"), Out(Pointer(ObjPointer(ID3D11DeviceContext)), "ppImmediateContext")]), |
| 1322 | StdFunction(HRESULT, "D3D11CreateDeviceAndSwapChain", [(ObjPointer(IDXGIAdapter), "pAdapter"), (D3D_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (D3D11_CREATE_DEVICE_FLAG, "Flags"), (Array(Const(D3D_FEATURE_LEVEL), "FeatureLevels"), "pFeatureLevels"), (UINT, "FeatureLevels"), (UINT, "SDKVersion"), (Pointer(Const(DXGI_SWAP_CHAIN_DESC)), "pSwapChainDesc"), Out(Pointer(ObjPointer(IDXGISwapChain)), "ppSwapChain"), Out(Pointer(ObjPointer(ID3D11Device)), "ppDevice"), Out(Pointer(D3D_FEATURE_LEVEL), "pFeatureLevel"), Out(Pointer(ObjPointer(ID3D11DeviceContext)), "ppImmediateContext")]), |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1323 | ]) |
| 1324 | |
| 1325 | d3d11.addInterfaces([ |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1326 | ID3D11Debug, |
José Fonseca | f17f464 | 2012-04-16 13:06:44 +0100 | [diff] [blame] | 1327 | ID3D11InfoQueue, |
| 1328 | ID3D11SwitchToRef, |
José Fonseca | 5b6fb75 | 2012-04-14 14:56:45 +0100 | [diff] [blame] | 1329 | ]) |
José Fonseca | fc58d05 | 2014-06-13 12:47:19 +0100 | [diff] [blame] | 1330 | |
| 1331 | # Add D3D11.1 |
| 1332 | import d3d11_1 |