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