]> git.cworth.org Git - apitrace/blob - specs/d3d10_1.py
Trace d3d10.1 too.
[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 d3d10sdklayers import *
30 from d3d10 import *
31
32 ID3D10Blob = Interface("ID3D10Blob", IUnknown)
33 LPD3D10BLOB = Pointer(ID3D10Blob)
34
35 ID3D10Blob.methods += [
36     Method(LPVOID, "GetBufferPointer", []),
37     Method(SIZE_T, "GetBufferSize", []),
38 ]
39
40 D3D10_DRIVER_TYPE = Enum("D3D10_DRIVER_TYPE", [
41     "D3D10_DRIVER_TYPE_HARDWARE",
42     "D3D10_DRIVER_TYPE_REFERENCE",
43     "D3D10_DRIVER_TYPE_NULL",
44     "D3D10_DRIVER_TYPE_SOFTWARE",
45     "D3D10_DRIVER_TYPE_WARP",
46 ])
47
48 D3D10_FEATURE_LEVEL1 = Enum("D3D10_FEATURE_LEVEL1", [
49     "D3D10_FEATURE_LEVEL_10_0",
50     "D3D10_FEATURE_LEVEL_10_1",
51         "D3D10_FEATURE_LEVEL_9_1",
52         "D3D10_FEATURE_LEVEL_9_2",
53         "D3D10_FEATURE_LEVEL_9_3",
54 ])
55
56 D3D10_RENDER_TARGET_BLEND_DESC1 = Struct("D3D10_RENDER_TARGET_BLEND_DESC1", [
57     (BOOL, "BlendEnable"),
58     (D3D10_BLEND, "SrcBlend"),
59     (D3D10_BLEND, "DestBlend"),
60     (D3D10_BLEND_OP, "BlendOp"),
61     (D3D10_BLEND, "SrcBlendAlpha"),
62     (D3D10_BLEND, "DestBlendAlpha"),
63     (D3D10_BLEND_OP, "BlendOpAlpha"),
64     (UINT8, "RenderTargetWriteMask"),
65 ])
66
67 D3D10_BLEND_DESC1 = Struct("D3D10_BLEND_DESC1", [
68     (BOOL, "AlphaToCoverageEnable"),
69     (BOOL, "IndependentBlendEnable"),
70     (Array(D3D10_RENDER_TARGET_BLEND_DESC1, "D3D10_SIMULTANEOUS_RENDER_TARGET_COUNT"), "RenderTarget"),
71 ])
72
73 ID3D10BlendState1 = Interface("ID3D10BlendState1", ID3D10BlendState)
74 ID3D10BlendState1.methods += [
75     Method(Void, "GetDesc1", [Out(Pointer(D3D10_BLEND_DESC1), "pDesc")]),
76 ]
77
78 D3D10_TEXCUBE_ARRAY_SRV1 = Struct("D3D10_TEXCUBE_ARRAY_SRV1", [
79     (UINT, "MostDetailedMip"),
80     (UINT, "MipLevels"),
81     (UINT, "First2DArrayFace"),
82     (UINT, "NumCubes"),
83 ])
84
85 D3D10_SRV_DIMENSION1 = Alias("D3D10_SRV_DIMENSION1", D3D10_SRV_DIMENSION)
86 D3D10_SHADER_RESOURCE_VIEW_DESC1 = Struct("D3D10_SHADER_RESOURCE_VIEW_DESC1", [
87     (DXGI_FORMAT, "Format"),
88     (D3D10_SRV_DIMENSION1, "ViewDimension"),
89     (D3D10_BUFFER_SRV, "Buffer"),
90     (D3D10_TEX1D_SRV, "Texture1D"),
91     (D3D10_TEX1D_ARRAY_SRV, "Texture1DArray"),
92     (D3D10_TEX2D_SRV, "Texture2D"),
93     (D3D10_TEX2D_ARRAY_SRV, "Texture2DArray"),
94     (D3D10_TEX2DMS_SRV, "Texture2DMS"),
95     (D3D10_TEX2DMS_ARRAY_SRV, "Texture2DMSArray"),
96     (D3D10_TEX3D_SRV, "Texture3D"),
97     (D3D10_TEXCUBE_SRV, "TextureCube"),
98     (D3D10_TEXCUBE_ARRAY_SRV1, "TextureCubeArray"),
99 ])
100
101 ID3D10ShaderResourceView1 = Interface("ID3D10ShaderResourceView1", ID3D10ShaderResourceView)
102 ID3D10ShaderResourceView1.methods += [
103     Method(Void, "GetDesc1", [Out(Pointer(D3D10_SHADER_RESOURCE_VIEW_DESC1), "pDesc")]),
104 ]
105
106 ID3D10Device1 = Interface("ID3D10Device1", ID3D10Device)
107 ID3D10Device1.methods += [
108     Method(HRESULT, "CreateShaderResourceView1", [(Pointer(ID3D10Resource), "pResource"), Out(Pointer(Const(D3D10_SHADER_RESOURCE_VIEW_DESC1)), "pDesc"), Out(Pointer(Pointer(ID3D10ShaderResourceView1)), "ppSRView")]),
109     Method(HRESULT, "CreateBlendState1", [(Pointer(Const(D3D10_BLEND_DESC1)), "pBlendStateDesc"), Out(Pointer(Pointer(ID3D10BlendState1)), "ppBlendState")]),
110     Method(D3D10_FEATURE_LEVEL1, "GetFeatureLevel", []),
111 ]
112
113 d3d10_1 = API("d3d10_1")
114 d3d10_1.addFunctions([
115     StdFunction(HRESULT, "D3D10CreateDevice1", [(Pointer(IDXGIAdapter), "pAdapter"), (D3D10_DRIVER_TYPE, "DriverType"), (HMODULE, "Software"), (D3D10_CREATE_DEVICE_FLAG, "Flags"), (D3D10_FEATURE_LEVEL1, "HardwareLevel"), (UINT, "SDKVersion"), Out(Pointer(Pointer(ID3D10Device1)), "ppDevice")]),
116     StdFunction(HRESULT, "D3D10CreateDeviceAndSwapChain1", [(Pointer(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(Pointer(IDXGISwapChain)), "ppSwapChain"), Out(Pointer(Pointer(ID3D10Device1)), "ppDevice")]),
117     StdFunction(HRESULT, "D3D10CreateBlob", [(SIZE_T, "NumBytes"), Out(Pointer(LPD3D10BLOB), "ppBuffer")]),
118 ])
119
120 d3d10_1.addInterfaces([
121     IDXGIDevice,
122     ID3D10Debug,
123     ID3D10SwitchToRef,
124     ID3D10InfoQueue,
125     ID3D10DeviceChild,
126     ID3D10Resource,
127     ID3D10Buffer,
128     ID3D10Texture1D,
129     ID3D10Texture2D,
130     ID3D10Texture3D,
131     ID3D10View,
132     ID3D10DepthStencilView,
133     ID3D10RenderTargetView,
134     ID3D10ShaderResourceView1,
135     ID3D10BlendState1,
136     ID3D10DepthStencilState,
137     ID3D10GeometryShader,
138     ID3D10InputLayout,
139     ID3D10PixelShader,
140     ID3D10RasterizerState,
141     ID3D10SamplerState,
142     ID3D10VertexShader,
143     ID3D10Asynchronous,
144     ID3D10Counter,
145     ID3D10Query,
146     ID3D10Predicate,
147     ID3D10Device,
148     ID3D10Multithread,
149 ])