xref: /aosp_15_r20/external/mesa3d/src/gallium/frontends/nine/device9ex.h (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1 /*
2  * Copyright 2011 Joakim Sindholt <[email protected]>
3  * SPDX-License-Identifier: MIT
4  */
5 
6 #ifndef _NINE_DEVICE9EX_H_
7 #define _NINE_DEVICE9EX_H_
8 
9 #include "device9.h"
10 
11 struct NineDevice9Ex
12 {
13     struct NineDevice9 base;
14 };
15 static inline struct NineDevice9Ex *
NineDevice9Ex(void * data)16 NineDevice9Ex( void *data )
17 {
18     return (struct NineDevice9Ex *)data;
19 }
20 
21 HRESULT
22 NineDevice9Ex_new( struct pipe_screen *pScreen,
23                    D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
24                    D3DCAPS9 *pCaps,
25                    D3DPRESENT_PARAMETERS *pPresentationParameters,
26                    D3DDISPLAYMODEEX *pFullscreenDisplayMode,
27                    IDirect3D9Ex *pD3D9Ex,
28                    ID3DPresentGroup *pPresentationGroup,
29                    struct d3dadapter9_context *pCTX,
30                    struct NineDevice9Ex **ppOut,
31                    int minorVersionNum );
32 
33 HRESULT NINE_WINAPI
34 NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
35                                         UINT width,
36                                         UINT height,
37                                         float *rows,
38                                         float *columns );
39 
40 HRESULT NINE_WINAPI
41 NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
42                             IDirect3DSurface9 *pSrc,
43                             IDirect3DSurface9 *pDst,
44                             IDirect3DVertexBuffer9 *pSrcRectDescs,
45                             UINT NumRects,
46                             IDirect3DVertexBuffer9 *pDstRectDescs,
47                             D3DCOMPOSERECTSOP Operation,
48                             int Xoffset,
49                             int Yoffset );
50 
51 HRESULT NINE_WINAPI
52 NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
53                          const RECT *pSourceRect,
54                          const RECT *pDestRect,
55                          HWND hDestWindowOverride,
56                          const RGNDATA *pDirtyRegion,
57                          DWORD dwFlags );
58 
59 HRESULT NINE_WINAPI
60 NineDevice9Ex_Present( struct NineDevice9Ex *This,
61                      const RECT *pSourceRect,
62                      const RECT *pDestRect,
63                      HWND hDestWindowOverride,
64                      const RGNDATA *pDirtyRegion );
65 
66 HRESULT NINE_WINAPI
67 NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
68                                     INT *pPriority );
69 
70 HRESULT NINE_WINAPI
71 NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
72                                     INT Priority );
73 
74 HRESULT NINE_WINAPI
75 NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
76                              UINT iSwapChain );
77 
78 HRESULT NINE_WINAPI
79 NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
80                                       IDirect3DResource9 **pResourceArray,
81                                       UINT32 NumResources );
82 
83 HRESULT NINE_WINAPI
84 NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
85                                       UINT MaxLatency );
86 
87 HRESULT NINE_WINAPI
88 NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
89                                       UINT *pMaxLatency );
90 
91 HRESULT NINE_WINAPI
92 NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
93                                 HWND hDestinationWindow );
94 
95 HRESULT NINE_WINAPI
96 NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
97                                     UINT Width,
98                                     UINT Height,
99                                     D3DFORMAT Format,
100                                     D3DMULTISAMPLE_TYPE MultiSample,
101                                     DWORD MultisampleQuality,
102                                     BOOL Lockable,
103                                     IDirect3DSurface9 **ppSurface,
104                                     HANDLE *pSharedHandle,
105                                     DWORD Usage );
106 
107 HRESULT NINE_WINAPI
108 NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
109                                              UINT Width,
110                                              UINT Height,
111                                              D3DFORMAT Format,
112                                              D3DPOOL Pool,
113                                              IDirect3DSurface9 **ppSurface,
114                                              HANDLE *pSharedHandle,
115                                              DWORD Usage );
116 
117 HRESULT NINE_WINAPI
118 NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
119                                            UINT Width,
120                                            UINT Height,
121                                            D3DFORMAT Format,
122                                            D3DMULTISAMPLE_TYPE MultiSample,
123                                            DWORD MultisampleQuality,
124                                            BOOL Discard,
125                                            IDirect3DSurface9 **ppSurface,
126                                            HANDLE *pSharedHandle,
127                                            DWORD Usage );
128 
129 HRESULT NINE_WINAPI
130 NineDevice9Ex_ResetEx( struct NineDevice9Ex *This,
131                        D3DPRESENT_PARAMETERS *pPresentationParameters,
132                        D3DDISPLAYMODEEX *pFullscreenDisplayMode );
133 
134 HRESULT NINE_WINAPI
135 NineDevice9Ex_Reset( struct NineDevice9Ex *This,
136                      D3DPRESENT_PARAMETERS *pPresentationParameters );
137 
138 HRESULT NINE_WINAPI
139 NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
140                                 UINT iSwapChain,
141                                 D3DDISPLAYMODEEX *pMode,
142                                 D3DDISPLAYROTATION *pRotation );
143 
144 HRESULT NINE_WINAPI
145 NineDevice9Ex_TestCooperativeLevel( struct NineDevice9Ex *This );
146 
147 #endif /* _NINE_DEVICE9EX_H_ */
148