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
);
50 NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex
*This
,
57 NineDevice9Ex_ComposeRects( struct NineDevice9Ex
*This
,
58 IDirect3DSurface9
*pSrc
,
59 IDirect3DSurface9
*pDst
,
60 IDirect3DVertexBuffer9
*pSrcRectDescs
,
62 IDirect3DVertexBuffer9
*pDstRectDescs
,
63 D3DCOMPOSERECTSOP Operation
,
68 NineDevice9Ex_PresentEx( struct NineDevice9Ex
*This
,
69 const RECT
*pSourceRect
,
70 const RECT
*pDestRect
,
71 HWND hDestWindowOverride
,
72 const RGNDATA
*pDirtyRegion
,
76 NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex
*This
,
80 NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex
*This
,
84 NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex
*This
,
88 NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex
*This
,
89 IDirect3DResource9
**pResourceArray
,
90 UINT32 NumResources
);
93 NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex
*This
,
97 NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex
*This
,
101 NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex
*This
,
102 HWND hDestinationWindow
);
105 NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex
*This
,
109 D3DMULTISAMPLE_TYPE MultiSample
,
110 DWORD MultisampleQuality
,
112 IDirect3DSurface9
**ppSurface
,
113 HANDLE
*pSharedHandle
,
117 NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex
*This
,
122 IDirect3DSurface9
**ppSurface
,
123 HANDLE
*pSharedHandle
,
127 NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex
*This
,
131 D3DMULTISAMPLE_TYPE MultiSample
,
132 DWORD MultisampleQuality
,
134 IDirect3DSurface9
**ppSurface
,
135 HANDLE
*pSharedHandle
,
139 NineDevice9Ex_ResetEx( struct NineDevice9Ex
*This
,
140 D3DPRESENT_PARAMETERS
*pPresentationParameters
,
141 D3DDISPLAYMODEEX
*pFullscreenDisplayMode
);
144 NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex
*This
,
146 D3DDISPLAYMODEEX
*pMode
,
147 D3DDISPLAYROTATION
*pRotation
);
149 #endif /* _NINE_DEVICE9EX_H_ */