st/nine: Fix present_buffers allocation
[mesa.git] / src / gallium / state_trackers / nine / device9ex.h
1 /*
2 * Copyright 2011 Joakim Sindholt <opensource@zhasha.com>
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21 * USE OR OTHER DEALINGS IN THE SOFTWARE. */
22
23 #ifndef _NINE_DEVICE9EX_H_
24 #define _NINE_DEVICE9EX_H_
25
26 #include "device9.h"
27
28 struct NineDevice9Ex
29 {
30 struct NineDevice9 base;
31 };
32 static INLINE struct NineDevice9Ex *
33 NineDevice9Ex( void *data )
34 {
35 return (struct NineDevice9Ex *)data;
36 }
37
38 HRESULT
39 NineDevice9Ex_new( struct pipe_screen *pScreen,
40 D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
41 D3DCAPS9 *pCaps,
42 D3DPRESENT_PARAMETERS *pPresentationParameters,
43 D3DDISPLAYMODEEX *pFullscreenDisplayMode,
44 IDirect3D9Ex *pD3D9Ex,
45 ID3DPresentGroup *pPresentationGroup,
46 struct d3dadapter9_context *pCTX,
47 struct NineDevice9Ex **ppOut );
48
49 HRESULT WINAPI
50 NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
51 UINT width,
52 UINT height,
53 float *rows,
54 float *columns );
55
56 HRESULT WINAPI
57 NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
58 IDirect3DSurface9 *pSrc,
59 IDirect3DSurface9 *pDst,
60 IDirect3DVertexBuffer9 *pSrcRectDescs,
61 UINT NumRects,
62 IDirect3DVertexBuffer9 *pDstRectDescs,
63 D3DCOMPOSERECTSOP Operation,
64 int Xoffset,
65 int Yoffset );
66
67 HRESULT WINAPI
68 NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
69 const RECT *pSourceRect,
70 const RECT *pDestRect,
71 HWND hDestWindowOverride,
72 const RGNDATA *pDirtyRegion,
73 DWORD dwFlags );
74
75 HRESULT WINAPI
76 NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
77 INT *pPriority );
78
79 HRESULT WINAPI
80 NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
81 INT Priority );
82
83 HRESULT WINAPI
84 NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
85 UINT iSwapChain );
86
87 HRESULT WINAPI
88 NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
89 IDirect3DResource9 **pResourceArray,
90 UINT32 NumResources );
91
92 HRESULT WINAPI
93 NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
94 UINT MaxLatency );
95
96 HRESULT WINAPI
97 NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
98 UINT *pMaxLatency );
99
100 HRESULT WINAPI
101 NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
102 HWND hDestinationWindow );
103
104 HRESULT WINAPI
105 NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
106 UINT Width,
107 UINT Height,
108 D3DFORMAT Format,
109 D3DMULTISAMPLE_TYPE MultiSample,
110 DWORD MultisampleQuality,
111 BOOL Lockable,
112 IDirect3DSurface9 **ppSurface,
113 HANDLE *pSharedHandle,
114 DWORD Usage );
115
116 HRESULT WINAPI
117 NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
118 UINT Width,
119 UINT Height,
120 D3DFORMAT Format,
121 D3DPOOL Pool,
122 IDirect3DSurface9 **ppSurface,
123 HANDLE *pSharedHandle,
124 DWORD Usage );
125
126 HRESULT WINAPI
127 NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
128 UINT Width,
129 UINT Height,
130 D3DFORMAT Format,
131 D3DMULTISAMPLE_TYPE MultiSample,
132 DWORD MultisampleQuality,
133 BOOL Discard,
134 IDirect3DSurface9 **ppSurface,
135 HANDLE *pSharedHandle,
136 DWORD Usage );
137
138 HRESULT WINAPI
139 NineDevice9Ex_ResetEx( struct NineDevice9Ex *This,
140 D3DPRESENT_PARAMETERS *pPresentationParameters,
141 D3DDISPLAYMODEEX *pFullscreenDisplayMode );
142
143 HRESULT WINAPI
144 NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
145 UINT iSwapChain,
146 D3DDISPLAYMODEEX *pMode,
147 D3DDISPLAYROTATION *pRotation );
148
149 #endif /* _NINE_DEVICE9EX_H_ */