]> git.cworth.org Git - apitrace/blob - specs/d3d10_1.py
d3d10/d3d11: Correct out pointers.
[apitrace] / specs / d3d10_1.py
1 ##########################################################################
2 #
3 # Copyright 2008-2012 VMware, Inc.
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 """d3d10_1.h"""
27
28 from winapi import *
29 from d3d10 import *
30
31 D3D10_DRIVER_TYPE = Enum("D3D10_DRIVER_TYPE", [
32     "D3D10_DRIVER_TYPE_HARDWARE",
33     "D3D10_DRIVER_TYPE_REFERENCE",
34     "D3D10_DRIVER_TYPE_NULL",
35     "D3D10_DRIVER_TYPE_SOFTWARE",
36     "D3D10_DRIVER_TYPE_WARP",
37 ])
38
39 D3D10_FEATURE_LEVEL1 = Enum("D3D10_FEATURE_LEVEL1", [
40     "D3D10_FEATURE_LEVEL_10_0",
41     "D3D10_FEATURE_LEVEL_10_1",
42         "D3D10_FEATURE_LEVEL_9_1",
43         "D3D10_FEATURE_LEVEL_9_2",
44         "D3D10_FEATURE_LEVEL_9_3",
45 ])
46
47 D3D10_RENDER_TARGET_BLEND_DESC1 = Struct("D3D10_RENDER_TARGET_BLEND_DESC1", [
48     (BOOL, "BlendEnable"),
49     (D3D10_BLEND, "SrcBlend"),
50     (D3D10_BLEND, "DestBlend"),
51     (D3D10_BLEND_OP, "BlendOp"),
52     (D3D10_BLEND, "SrcBlendAlpha"),
53     (D3D10_BLEND, "DestBlendAlpha"),
54     (D3D10_BLEND_OP, "BlendOpAlpha"),
55     (UINT8, "RenderTargetWriteMask"),
56 ])
57
58 D3D10_BLEND_DESC1 = Struct("D3D10_BLEND_DESC1", [
59     (BOOL, "AlphaToCoverageEnable"),
60     (BOOL, "IndependentBlendEnable"),
61     (Array(D3D10_RENDER_TARGET_BLEND_DESC1, "D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT"), "RenderTarget"),
62 ])
63
64 ID3D10BlendState1 = Interface("ID3D10BlendState1", ID3D10BlendState)
65 ID3D10BlendState1.methods += [
66     Method(Void, "GetDesc1", [Out(Pointer(D3D10_BLEND_DESC1), "pDesc")]),
67 ]
68
69 D3D10_TEXCUBE_ARRAY_SRV1 = Struct("D3D10_TEXCUBE_ARRAY_SRV1", [
70     (UINT, "MostDetailedMip"),
71     (UINT, "MipLevels"),
72     (UINT, "First2DArrayFace"),
73     (UINT, "NumCubes"),
74 ])
75
76 D3D10_SHADER_RESOURCE_VIEW_DESC1 = Struct("D3D10_SHADER_RESOURCE_VIEW_DESC1", [
77     (DXGI_FORMAT, "Format"),
78     (D3D10_SRV_DIMENSION1, "ViewDimension"),
79     (D3D10_BUFFER_SRV, "Buffer"),
80     (D3D10_TEX1D_SRV, "Texture1D"),
81     (D3D10_TEX1D_ARRAY_SRV, "Texture1DArray"),
82     (D3D10_TEX2D_SRV, "Texture2D"),
83     (D3D10_TEX2D_ARRAY_SRV, "Texture2DArray"),
84     (D3D10_TEX2DMS_SRV, "Texture2DMS"),
85     (D3D10_TEX2DMS_ARRAY_SRV, "Texture2DMSArray"),
86     (D3D10_TEX3D_SRV, "Texture3D"),
87     (D3D10_TEXCUBE_SRV, "TextureCube"),
88     (D3D10_TEXCUBE_ARRAY_SRV1, "TextureCubeArray"),
89 ])
90
91 ID3D10ShaderResourceView1 = Interface("ID3D10ShaderResourceView1", ID3D10ShaderResourceView)
92 ID3D10ShaderResourceView1.methods += [
93     Method(Void, "GetDesc1", [Out(Pointer(D3D10_SHADER_RESOURCE_VIEW_DESC1), "pDesc")]),
94 ]
95
96 ID3D10Device1 = Interface("ID3D10Device1", ID3D10Device)
97 ID3D10Device1.methods += [
98     Method(HRESULT, "CreateShaderResourceView1", [(ObjPointer(ID3D10Resource), "pResource"), Out(Pointer(Const(D3D10_SHADER_RESOURCE_VIEW_DESC1)), "pDesc"), Out(Pointer(ObjPointer(ID3D10ShaderResourceView1)), "ppSRView")]),
99     Method(HRESULT, "CreateBlendState1", [(Pointer(Const(D3D10_BLEND_DESC1)), "pBlendStateDesc"), Out(Pointer(ObjPointer(ID3D10BlendState1)), "ppBlendState")]),
100     Method(D3D10_FEATURE_LEVEL1, "GetFeatureLevel", []),
101 ]
102
103 d3d10_1 = API("d3d10_1")
104 d3d10_1.addFunctions([
105     StdFunction(HRESULT, "D3D10CreateDevice1", [(ObjPointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (D3D10_CREATE_DEVICE_FLAG, "Flags"), (D3D10_FEATURE_LEVEL1, "HardwareLevel"), (UINT, "SDKVersion"), Out(Pointer(ObjPointer(ID3D10Device1)), "ppDevice")]),
106     StdFunction(HRESULT, "D3D10CreateDeviceAndSwapChain1", [(ObjPointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (D3D10_CREATE_DEVICE_FLAG, "Flags"), (D3D10_FEATURE_LEVEL1, "HardwareLevel"), (UINT, "SDKVersion"), (Pointer(DXGI_SWAP_CHAIN_DESC), "pSwapChainDesc"), Out(Pointer(ObjPointer(IDXGISwapChain)), "ppSwapChain"), Out(Pointer(ObjPointer(ID3D10Device1)), "ppDevice")]),
107     StdFunction(HRESULT, "D3D10CreateBlob", [(SIZE_T, "NumBytes"), Out(Pointer(LPD3D10BLOB), "ppBuffer")]),
108 ])
109
110 d3d10_1.addInterfaces([
111     IDXGIAdapter1,
112     IDXGIDevice1,
113     IDXGIResource,
114     ID3D10Debug,
115     ID3D10InfoQueue,
116     ID3D10Multithread,
117     ID3D10SwitchToRef,
118 ])