aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/d3d1x/d3dapi/d3d10_1.idl
blob: 7edeff94f790260dfe23492c3c0752630e5674a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
/**************************************************************************
 *
 * Copyright 2010 Luca Barbieri
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial
 * portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 **************************************************************************/

import "oaidl.idl";
import "ocidl.idl";
import "d3d10.idl";
import "d3dcommon.idl";

const unsigned int D3D10_1_SDK_VERSION = 0x20;

cpp_quote("#ifndef _D3D10_1_CONSTANTS")
cpp_quote("#define _D3D10_1_CONSTANTS")
const unsigned int D3D10_1_DEFAULT_SAMPLE_MASK = 0xffffffff;
const float D3D10_1_FLOAT16_FUSED_TOLERANCE_IN_ULP = 0.6;
const float D3D10_1_FLOAT32_TO_INTEGER_TOLERANCE_IN_ULP = 0.6;
const unsigned int D3D10_1_GS_INPUT_REGISTER_COUNT = 32;
const unsigned int D3D10_1_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT = 32;
const unsigned int D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENTS_COMPONENTS = 128;
const unsigned int D3D10_1_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT = 32;
const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENTS = 1;
const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COMPONENT_BIT_COUNT = 32;
const unsigned int D3D10_1_PS_OUTPUT_MASK_REGISTER_COUNT = 1;
const unsigned int D3D10_1_SHADER_MAJOR_VERSION = 4;
const unsigned int D3D10_1_SHADER_MINOR_VERSION = 1;
const unsigned int D3D10_1_SO_BUFFER_MAX_STRIDE_IN_BYTES = 2048;
const unsigned int D3D10_1_SO_BUFFER_MAX_WRITE_WINDOW_IN_BYTES = 256;
const unsigned int D3D10_1_SO_BUFFER_SLOT_COUNT = 4;
const unsigned int D3D10_1_SO_MULTIPLE_BUFFER_ELEMENTS_PER_BUFFER = 1;
const unsigned int D3D10_1_SO_SINGLE_BUFFER_COMPONENT_LIMIT = 64;
const unsigned int D3D10_1_STANDARD_VERTEX_ELEMENT_COUNT = 32;
const unsigned int D3D10_1_SUBPIXEL_FRACTIONAL_BIT_COUNT = 8;
const unsigned int D3D10_1_VS_INPUT_REGISTER_COUNT = 32;
const unsigned int D3D10_1_VS_OUTPUT_REGISTER_COUNT = 32;
cpp_quote("#endif")

typedef enum D3D10_FEATURE_LEVEL1
{
	D3D10_FEATURE_LEVEL_10_0 = 0xa000,
	D3D10_FEATURE_LEVEL_10_1 = 0xa100,
	D3D10_FEATURE_LEVEL_9_1 = 0x9100,
	D3D10_FEATURE_LEVEL_9_2 = 0x9200,
	D3D10_FEATURE_LEVEL_9_3 = 0x9300
} D3D10_FEATURE_LEVEL1;

typedef struct D3D10_RENDER_TARGET_BLEND_DESC1
{
	BOOL BlendEnable;
	D3D10_BLEND SrcBlend;
	D3D10_BLEND DestBlend;
	D3D10_BLEND_OP BlendOp;
	D3D10_BLEND SrcBlendAlpha;
	D3D10_BLEND DestBlendAlpha;
	D3D10_BLEND_OP BlendOpAlpha;
	UINT8 RenderTargetWriteMask;
} D3D10_RENDER_TARGET_BLEND_DESC1;

typedef struct D3D10_BLEND_DESC1
{
	BOOL AlphaToCoverageEnable;
	BOOL IndependentBlendEnable;
	D3D10_RENDER_TARGET_BLEND_DESC1 RenderTarget[8];
} D3D10_BLEND_DESC1;

typedef struct D3D10_TEXCUBE_ARRAY_SRV1
{
	UINT MostDetailedMip;
	UINT MipLevels;
	UINT First2DArrayFace;
	UINT NumCubes;
} D3D10_TEXCUBE_ARRAY_SRV1;

typedef D3D_SRV_DIMENSION D3D10_SRV_DIMENSION1;

typedef struct D3D10_SHADER_RESOURCE_VIEW_DESC1
{
	DXGI_FORMAT Format;
	D3D10_SRV_DIMENSION1 ViewDimension;
	union 
	{
		D3D10_BUFFER_SRV Buffer;
		D3D10_TEX1D_SRV Texture1D;
		D3D10_TEX1D_ARRAY_SRV Texture1DArray;
		D3D10_TEX2D_SRV Texture2D;
		D3D10_TEX2D_ARRAY_SRV Texture2DArray;
		D3D10_TEX2DMS_SRV Texture2DMS;
		D3D10_TEX2DMS_ARRAY_SRV Texture2DMSArray;
		D3D10_TEX3D_SRV Texture3D;
		D3D10_TEXCUBE_SRV TextureCube;
		D3D10_TEXCUBE_ARRAY_SRV1 TextureCubeArray;
	} ;
} D3D10_SHADER_RESOURCE_VIEW_DESC1;

typedef enum D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS
{
	D3D10_STANDARD_MULTISAMPLE_PATTERN = 0xffffffff,
	D3D10_CENTER_MULTISAMPLE_PATTERN = 0xfffffffe
} D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS;

[object, local, uuid("EDAD8D99-8A35-4d6d-8566-2EA276CDE161")]
interface ID3D10BlendState1 : ID3D10BlendState
{
	void GetDesc1( 
		[out] D3D10_BLEND_DESC1 *a
	);
};

[object, local, uuid("9B7E4C87-342C-4106-A19F-4F2704F689F0")]
interface ID3D10ShaderResourceView1 : ID3D10ShaderResourceView
{
	void GetDesc1( 
		[out] D3D10_SHADER_RESOURCE_VIEW_DESC1 *a
	);
};

[object, local, uuid("9B7E4C8F-342C-4106-A19F-4F2704F689F0")]
interface ID3D10Device1 : ID3D10Device
{
	HRESULT CreateShaderResourceView1( 
		[in] ID3D10Resource *a,
		[in] const D3D10_SHADER_RESOURCE_VIEW_DESC1 *b,
		[out,optional] ID3D10ShaderResourceView1 **c
	);
	
	HRESULT CreateBlendState1( 
		[in] const D3D10_BLEND_DESC1 *a,
		[out, optional] ID3D10BlendState1 **b
	);

	D3D10_FEATURE_LEVEL1 GetFeatureLevel();
};

//cpp_quote("#include \"d3d10_1shader.h\"")

typedef enum D3D10_DRIVER_TYPE D3D10_DRIVER_TYPE;

HRESULT D3D10CreateDevice1(
	[in,optional] IDXGIAdapter* a,
	[in] D3D10_DRIVER_TYPE b,
	[in] HMODULE c,
	[in] UINT d,
	[in] D3D10_FEATURE_LEVEL1 e,
	[in] UINT f,
	[out,optional] ID3D10Device1** g
);

typedef HRESULT (* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN1)(
	[in,optional] IDXGIAdapter*,
	D3D10_DRIVER_TYPE,
	HMODULE,
	UINT, 
	D3D10_FEATURE_LEVEL1,
	UINT,
	[in, optional] DXGI_SWAP_CHAIN_DESC*,
	[out,optional] IDXGISwapChain**,
	[out,optional] ID3D10Device1**
);

HRESULT D3D10CreateDeviceAndSwapChain1(
	[in,optional] IDXGIAdapter* a,
	[in] D3D10_DRIVER_TYPE b,
	[in] HMODULE c,
	[in] UINT d,
	[in] D3D10_FEATURE_LEVEL1 e,
	[in] UINT f,
	[in,optional] DXGI_SWAP_CHAIN_DESC* g,
	[out,optional] IDXGISwapChain** h,
	[out,optional] ID3D10Device1** i
);