]> git.cworth.org Git - apitrace/blob - specs/d3d8caps.py
check for error in eglMakeCurrent wrapper
[apitrace] / specs / d3d8caps.py
1 ##########################################################################
2 #
3 # Copyright 2008-2009 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 """d3d8caps.h"""
27
28 from winapi import *
29 from d3d8types import *
30
31 D3DCAPS = Flags(DWORD, [
32     "D3DCAPS_READ_SCANLINE",
33 ])
34
35 D3DCAPS2 = Flags(DWORD, [
36     "D3DCAPS2_NO2DDURING3DSCENE",
37     "D3DCAPS2_FULLSCREENGAMMA",
38     "D3DCAPS2_CANRENDERWINDOWED",
39     "D3DCAPS2_CANCALIBRATEGAMMA",
40     "D3DCAPS2_RESERVED",
41     "D3DCAPS2_CANMANAGERESOURCE",
42     "D3DCAPS2_DYNAMICTEXTURES",
43 ])
44
45 D3DCAPS3 = Flags(DWORD, [
46     "D3DCAPS3_RESERVED",
47     "D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD",
48 ])
49
50 D3DPRESENT_INTERVAL = Flags(DWORD, [
51     "D3DPRESENT_INTERVAL_DEFAULT",
52     "D3DPRESENT_INTERVAL_ONE",
53     "D3DPRESENT_INTERVAL_TWO",
54     "D3DPRESENT_INTERVAL_THREE",
55     "D3DPRESENT_INTERVAL_FOUR",
56     "D3DPRESENT_INTERVAL_IMMEDIATE",
57 ])
58
59 D3DCURSORCAPS = Flags(DWORD, [
60     "D3DCURSORCAPS_COLOR",
61     "D3DCURSORCAPS_LOWRES",
62 ])
63
64 D3DDEVCAPS = Flags(DWORD, [
65     "D3DDEVCAPS_EXECUTESYSTEMMEMORY",
66     "D3DDEVCAPS_EXECUTEVIDEOMEMORY",
67     "D3DDEVCAPS_TLVERTEXSYSTEMMEMORY",
68     "D3DDEVCAPS_TLVERTEXVIDEOMEMORY",
69     "D3DDEVCAPS_TEXTURESYSTEMMEMORY",
70     "D3DDEVCAPS_TEXTUREVIDEOMEMORY",
71     "D3DDEVCAPS_DRAWPRIMTLVERTEX",
72     "D3DDEVCAPS_CANRENDERAFTERFLIP",
73     "D3DDEVCAPS_TEXTURENONLOCALVIDMEM",
74     "D3DDEVCAPS_DRAWPRIMITIVES2",
75     "D3DDEVCAPS_SEPARATETEXTUREMEMORIES",
76     "D3DDEVCAPS_DRAWPRIMITIVES2EX",
77     "D3DDEVCAPS_HWTRANSFORMANDLIGHT",
78     "D3DDEVCAPS_CANBLTSYSTONONLOCAL",
79     "D3DDEVCAPS_HWRASTERIZATION",
80     "D3DDEVCAPS_PUREDEVICE",
81     "D3DDEVCAPS_QUINTICRTPATCHES",
82     "D3DDEVCAPS_RTPATCHES",
83     "D3DDEVCAPS_RTPATCHHANDLEZERO",
84     "D3DDEVCAPS_NPATCHES",
85 ])
86
87 D3DPMISCCAPS = Flags(DWORD, [
88     "D3DPMISCCAPS_MASKZ",
89     "D3DPMISCCAPS_LINEPATTERNREP",
90     "D3DPMISCCAPS_CULLNONE",
91     "D3DPMISCCAPS_CULLCW",
92     "D3DPMISCCAPS_CULLCCW",
93     "D3DPMISCCAPS_COLORWRITEENABLE",
94     "D3DPMISCCAPS_CLIPPLANESCALEDPOINTS",
95     "D3DPMISCCAPS_CLIPTLVERTS",
96     "D3DPMISCCAPS_TSSARGTEMP",
97     "D3DPMISCCAPS_BLENDOP",
98     "D3DPMISCCAPS_NULLREFERENCE",
99 ])
100
101 D3DLINECAPS = Flags(DWORD, [
102     "D3DLINECAPS_TEXTURE",
103     "D3DLINECAPS_ZTEST",
104     "D3DLINECAPS_BLEND",
105     "D3DLINECAPS_ALPHACMP",
106     "D3DLINECAPS_FOG",
107 ])
108
109 D3DPRASTERCAPS = Flags(DWORD, [
110     "D3DPRASTERCAPS_DITHER",
111     "D3DPRASTERCAPS_PAT",
112     "D3DPRASTERCAPS_ZTEST",
113     "D3DPRASTERCAPS_FOGVERTEX",
114     "D3DPRASTERCAPS_FOGTABLE",
115     "D3DPRASTERCAPS_ANTIALIASEDGES",
116     "D3DPRASTERCAPS_MIPMAPLODBIAS",
117     "D3DPRASTERCAPS_ZBIAS",
118     "D3DPRASTERCAPS_ZBUFFERLESSHSR",
119     "D3DPRASTERCAPS_FOGRANGE",
120     "D3DPRASTERCAPS_ANISOTROPY",
121     "D3DPRASTERCAPS_WBUFFER",
122     "D3DPRASTERCAPS_WFOG",
123     "D3DPRASTERCAPS_ZFOG",
124     "D3DPRASTERCAPS_COLORPERSPECTIVE",
125     "D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE",
126 ])
127
128 D3DPCMPCAPS = Flags(DWORD, [
129     "D3DPCMPCAPS_NEVER",
130     "D3DPCMPCAPS_LESS",
131     "D3DPCMPCAPS_EQUAL",
132     "D3DPCMPCAPS_LESSEQUAL",
133     "D3DPCMPCAPS_GREATER",
134     "D3DPCMPCAPS_NOTEQUAL",
135     "D3DPCMPCAPS_GREATEREQUAL",
136     "D3DPCMPCAPS_ALWAYS",
137 ])
138
139 D3DPBLENDCAPS = Flags(DWORD, [
140     "D3DPBLENDCAPS_ZERO",
141     "D3DPBLENDCAPS_ONE",
142     "D3DPBLENDCAPS_SRCCOLOR",
143     "D3DPBLENDCAPS_INVSRCCOLOR",
144     "D3DPBLENDCAPS_SRCALPHA",
145     "D3DPBLENDCAPS_INVSRCALPHA",
146     "D3DPBLENDCAPS_DESTALPHA",
147     "D3DPBLENDCAPS_INVDESTALPHA",
148     "D3DPBLENDCAPS_DESTCOLOR",
149     "D3DPBLENDCAPS_INVDESTCOLOR",
150     "D3DPBLENDCAPS_SRCALPHASAT",
151     "D3DPBLENDCAPS_BOTHSRCALPHA",
152     "D3DPBLENDCAPS_BOTHINVSRCALPHA",
153 ])
154
155 D3DPSHADECAPS = Flags(DWORD, [
156     "D3DPSHADECAPS_COLORGOURAUDRGB",
157     "D3DPSHADECAPS_SPECULARGOURAUDRGB",
158     "D3DPSHADECAPS_ALPHAGOURAUDBLEND",
159     "D3DPSHADECAPS_FOGGOURAUD",
160 ])
161
162 D3DPTEXTURECAPS = Flags(DWORD, [
163     "D3DPTEXTURECAPS_PERSPECTIVE",
164     "D3DPTEXTURECAPS_POW2",
165     "D3DPTEXTURECAPS_ALPHA",
166     "D3DPTEXTURECAPS_SQUAREONLY",
167     "D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE",
168     "D3DPTEXTURECAPS_ALPHAPALETTE",
169     "D3DPTEXTURECAPS_NONPOW2CONDITIONAL",
170     "D3DPTEXTURECAPS_PROJECTED",
171     "D3DPTEXTURECAPS_CUBEMAP",
172     "D3DPTEXTURECAPS_VOLUMEMAP",
173     "D3DPTEXTURECAPS_MIPMAP",
174     "D3DPTEXTURECAPS_MIPVOLUMEMAP",
175     "D3DPTEXTURECAPS_MIPCUBEMAP",
176     "D3DPTEXTURECAPS_CUBEMAP_POW2",
177     "D3DPTEXTURECAPS_VOLUMEMAP_POW2",
178 ])
179
180 D3DPTFILTERCAPS = Flags(DWORD, [
181     "D3DPTFILTERCAPS_MINFPOINT",
182     "D3DPTFILTERCAPS_MINFLINEAR",
183     "D3DPTFILTERCAPS_MINFANISOTROPIC",
184     "D3DPTFILTERCAPS_MIPFPOINT",
185     "D3DPTFILTERCAPS_MIPFLINEAR",
186     "D3DPTFILTERCAPS_MAGFPOINT",
187     "D3DPTFILTERCAPS_MAGFLINEAR",
188     "D3DPTFILTERCAPS_MAGFANISOTROPIC",
189     "D3DPTFILTERCAPS_MAGFAFLATCUBIC",
190     "D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC",
191 ])
192
193 D3DPTADDRESSCAPS = Flags(DWORD, [
194     "D3DPTADDRESSCAPS_WRAP",
195     "D3DPTADDRESSCAPS_MIRROR",
196     "D3DPTADDRESSCAPS_CLAMP",
197     "D3DPTADDRESSCAPS_BORDER",
198     "D3DPTADDRESSCAPS_INDEPENDENTUV",
199     "D3DPTADDRESSCAPS_MIRRORONCE",
200 ])
201
202 D3DSTENCILCAPS = Flags(DWORD, [
203     "D3DSTENCILCAPS_KEEP",
204     "D3DSTENCILCAPS_ZERO",
205     "D3DSTENCILCAPS_REPLACE",
206     "D3DSTENCILCAPS_INCRSAT",
207     "D3DSTENCILCAPS_DECRSAT",
208     "D3DSTENCILCAPS_INVERT",
209     "D3DSTENCILCAPS_INCR",
210     "D3DSTENCILCAPS_DECR",
211 ])
212
213 D3DTEXOPCAPS = Flags(DWORD, [
214     "D3DTEXOPCAPS_DISABLE",
215     "D3DTEXOPCAPS_SELECTARG1",
216     "D3DTEXOPCAPS_SELECTARG2",
217     "D3DTEXOPCAPS_MODULATE",
218     "D3DTEXOPCAPS_MODULATE2X",
219     "D3DTEXOPCAPS_MODULATE4X",
220     "D3DTEXOPCAPS_ADD",
221     "D3DTEXOPCAPS_ADDSIGNED",
222     "D3DTEXOPCAPS_ADDSIGNED2X",
223     "D3DTEXOPCAPS_SUBTRACT",
224     "D3DTEXOPCAPS_ADDSMOOTH",
225     "D3DTEXOPCAPS_BLENDDIFFUSEALPHA",
226     "D3DTEXOPCAPS_BLENDTEXTUREALPHA",
227     "D3DTEXOPCAPS_BLENDFACTORALPHA",
228     "D3DTEXOPCAPS_BLENDTEXTUREALPHAPM",
229     "D3DTEXOPCAPS_BLENDCURRENTALPHA",
230     "D3DTEXOPCAPS_PREMODULATE",
231     "D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR",
232     "D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA",
233     "D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR",
234     "D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA",
235     "D3DTEXOPCAPS_BUMPENVMAP",
236     "D3DTEXOPCAPS_BUMPENVMAPLUMINANCE",
237     "D3DTEXOPCAPS_DOTPRODUCT3",
238     "D3DTEXOPCAPS_MULTIPLYADD",
239     "D3DTEXOPCAPS_LERP",
240 ])
241
242 D3DFVFCAPS = Flags(DWORD, [
243     "D3DFVFCAPS_TEXCOORDCOUNTMASK",
244     "D3DFVFCAPS_DONOTSTRIPELEMENTS",
245     "D3DFVFCAPS_PSIZE",
246 ])
247
248 D3DVTXPCAPS = Flags(DWORD, [
249     "D3DVTXPCAPS_TEXGEN",
250     "D3DVTXPCAPS_MATERIALSOURCE7",
251     "D3DVTXPCAPS_DIRECTIONALLIGHTS",
252     "D3DVTXPCAPS_POSITIONALLIGHTS",
253     "D3DVTXPCAPS_LOCALVIEWER",
254     "D3DVTXPCAPS_TWEENING",
255     "D3DVTXPCAPS_NO_VSDT_UBYTE4",
256 ])
257
258 #D3DPS_VERSION = Enum("DWORD", [
259 #    "D3DPS_VERSION(0,0)",
260 #    "D3DPS_VERSION(1,0)",
261 #    "D3DPS_VERSION(1,1)",
262 #    "D3DPS_VERSION(1,2)",
263 #    "D3DPS_VERSION(1,3)",
264 #    "D3DPS_VERSION(1,4)",
265 #    "D3DPS_VERSION(2,0)",
266 #    "D3DPS_VERSION(3,0)",
267 #])
268 D3DPS_VERSION = DWORD
269
270 #D3DVS_VERSION = Enum("DWORD", [
271 #    "D3DVS_VERSION(0,0)",
272 #    "D3DVS_VERSION(1,0)",
273 #    "D3DVS_VERSION(1,1)",
274 #    "D3DVS_VERSION(2,0)",
275 #    "D3DVS_VERSION(3,0)",
276 #])
277 D3DVS_VERSION = DWORD
278
279
280 D3DCAPS8 = Struct("D3DCAPS8", [
281     (D3DDEVTYPE, "DeviceType"),
282     (UINT, "AdapterOrdinal"),
283     (D3DCAPS, "Caps"),
284     (D3DCAPS2, "Caps2"),
285     (D3DCAPS3, "Caps3"),
286     (D3DPRESENT_INTERVAL, "PresentationIntervals"),
287     (D3DCURSORCAPS, "CursorCaps"),
288     (D3DDEVCAPS, "DevCaps"),
289     (D3DPMISCCAPS, "PrimitiveMiscCaps"),
290     (D3DPRASTERCAPS, "RasterCaps"),
291     (D3DPCMPCAPS, "ZCmpCaps"),
292     (D3DPBLENDCAPS, "SrcBlendCaps"),
293     (D3DPBLENDCAPS, "DestBlendCaps"),
294     (D3DPCMPCAPS, "AlphaCmpCaps"),
295     (D3DPSHADECAPS, "ShadeCaps"),
296     (D3DPTEXTURECAPS, "TextureCaps"),
297     (D3DPTFILTERCAPS, "TextureFilterCaps"),
298     (D3DPTFILTERCAPS, "CubeTextureFilterCaps"),
299     (D3DPTFILTERCAPS, "VolumeTextureFilterCaps"),
300     (D3DPTADDRESSCAPS, "TextureAddressCaps"),
301     (D3DPTADDRESSCAPS, "VolumeTextureAddressCaps"),
302     (D3DLINECAPS, "LineCaps"),
303     (DWORD, "MaxTextureWidth"),
304     (DWORD, "MaxTextureHeight"),
305     (DWORD, "MaxVolumeExtent"),
306     (DWORD, "MaxTextureRepeat"),
307     (DWORD, "MaxTextureAspectRatio"),
308     (DWORD, "MaxAnisotropy"),
309     (Float, "MaxVertexW"),
310     (Float, "GuardBandLeft"),
311     (Float, "GuardBandTop"),
312     (Float, "GuardBandRight"),
313     (Float, "GuardBandBottom"),
314     (Float, "ExtentsAdjust"),
315     (D3DSTENCILCAPS, "StencilCaps"),
316     (D3DFVFCAPS, "FVFCaps"),
317     (D3DTEXOPCAPS, "TextureOpCaps"),
318     (DWORD, "MaxTextureBlendStages"),
319     (DWORD, "MaxSimultaneousTextures"),
320     (D3DVTXPCAPS, "VertexProcessingCaps"),
321     (DWORD, "MaxActiveLights"),
322     (DWORD, "MaxUserClipPlanes"),
323     (DWORD, "MaxVertexBlendMatrices"),
324     (DWORD, "MaxVertexBlendMatrixIndex"),
325     (Float, "MaxPointSize"),
326     (DWORD, "MaxPrimitiveCount"),
327     (DWORD, "MaxVertexIndex"),
328     (DWORD, "MaxStreams"),
329     (DWORD, "MaxStreamStride"),
330     (D3DVS_VERSION, "VertexShaderVersion"),
331     (DWORD, "MaxVertexShaderConst"),
332     (D3DPS_VERSION, "PixelShaderVersion"),
333     (Float, "MaxPixelShaderValue"),
334 ])
335