2 * Copyright 2011 Joakim Sindholt <opensource@zhasha.com>
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:
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
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. */
23 #ifndef _NINE_DEVICE9EX_H_
24 #define _NINE_DEVICE9EX_H_
30 struct NineDevice9 base
;
32 static inline struct NineDevice9Ex
*
33 NineDevice9Ex( void *data
)
35 return (struct NineDevice9Ex
*)data
;
39 NineDevice9Ex_new( struct pipe_screen
*pScreen
,
40 D3DDEVICE_CREATION_PARAMETERS
*pCreationParameters
,
42 D3DPRESENT_PARAMETERS
*pPresentationParameters
,
43 D3DDISPLAYMODEEX
*pFullscreenDisplayMode
,
44 IDirect3D9Ex
*pD3D9Ex
,
45 ID3DPresentGroup
*pPresentationGroup
,
46 struct d3dadapter9_context
*pCTX
,
47 struct NineDevice9Ex
**ppOut
,
48 int minorVersionNum
);
51 NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex
*This
,
58 NineDevice9Ex_ComposeRects( struct NineDevice9Ex
*This
,
59 IDirect3DSurface9
*pSrc
,
60 IDirect3DSurface9
*pDst
,
61 IDirect3DVertexBuffer9
*pSrcRectDescs
,
63 IDirect3DVertexBuffer9
*pDstRectDescs
,
64 D3DCOMPOSERECTSOP Operation
,
69 NineDevice9Ex_PresentEx( struct NineDevice9Ex
*This
,
70 const RECT
*pSourceRect
,
71 const RECT
*pDestRect
,
72 HWND hDestWindowOverride
,
73 const RGNDATA
*pDirtyRegion
,
77 NineDevice9Ex_Present( struct NineDevice9Ex
*This
,
78 const RECT
*pSourceRect
,
79 const RECT
*pDestRect
,
80 HWND hDestWindowOverride
,
81 const RGNDATA
*pDirtyRegion
);
84 NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex
*This
,
88 NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex
*This
,
92 NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex
*This
,
96 NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex
*This
,
97 IDirect3DResource9
**pResourceArray
,
98 UINT32 NumResources
);
101 NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex
*This
,
105 NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex
*This
,
109 NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex
*This
,
110 HWND hDestinationWindow
);
113 NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex
*This
,
117 D3DMULTISAMPLE_TYPE MultiSample
,
118 DWORD MultisampleQuality
,
120 IDirect3DSurface9
**ppSurface
,
121 HANDLE
*pSharedHandle
,
125 NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex
*This
,
130 IDirect3DSurface9
**ppSurface
,
131 HANDLE
*pSharedHandle
,
135 NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex
*This
,
139 D3DMULTISAMPLE_TYPE MultiSample
,
140 DWORD MultisampleQuality
,
142 IDirect3DSurface9
**ppSurface
,
143 HANDLE
*pSharedHandle
,
147 NineDevice9Ex_ResetEx( struct NineDevice9Ex
*This
,
148 D3DPRESENT_PARAMETERS
*pPresentationParameters
,
149 D3DDISPLAYMODEEX
*pFullscreenDisplayMode
);
152 NineDevice9Ex_Reset( struct NineDevice9Ex
*This
,
153 D3DPRESENT_PARAMETERS
*pPresentationParameters
);
156 NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex
*This
,
158 D3DDISPLAYMODEEX
*pMode
,
159 D3DDISPLAYROTATION
*pRotation
);
162 NineDevice9Ex_TestCooperativeLevel( struct NineDevice9Ex
*This
);
164 #endif /* _NINE_DEVICE9EX_H_ */