Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5564 | serge | 1 | /* |
2 | * Copyright 2011 Joakim Sindholt |
||
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_ADAPTER9_H_ |
||
24 | #define _NINE_ADAPTER9_H_ |
||
25 | |||
26 | #include "iunknown.h" |
||
27 | |||
28 | #include "d3dadapter/d3dadapter9.h" |
||
29 | |||
30 | struct pipe_screen; |
||
31 | struct pipe_resource; |
||
32 | |||
33 | struct d3dadapter9_context |
||
34 | { |
||
35 | struct pipe_screen *hal, *ref; |
||
36 | D3DADAPTER_IDENTIFIER9 identifier; |
||
37 | BOOL linear_framebuffer; |
||
38 | BOOL throttling; |
||
39 | int throttling_value; |
||
40 | int vblank_mode; |
||
41 | BOOL thread_submit; |
||
42 | |||
43 | void (*destroy)( struct d3dadapter9_context *ctx ); |
||
44 | }; |
||
45 | |||
46 | struct NineAdapter9 |
||
47 | { |
||
48 | struct NineUnknown base; |
||
49 | |||
50 | struct d3dadapter9_context *ctx; |
||
51 | }; |
||
52 | static INLINE struct NineAdapter9 * |
||
53 | NineAdapter9( void *data ) |
||
54 | { |
||
55 | return (struct NineAdapter9 *)data; |
||
56 | } |
||
57 | |||
58 | HRESULT |
||
59 | NineAdapter9_new( struct d3dadapter9_context *pCTX, |
||
60 | struct NineAdapter9 **ppOut ); |
||
61 | |||
62 | HRESULT |
||
63 | NineAdapter9_ctor( struct NineAdapter9 *This, |
||
64 | struct NineUnknownParams *pParams, |
||
65 | struct d3dadapter9_context *pCTX ); |
||
66 | |||
67 | void |
||
68 | NineAdapter9_dtor( struct NineAdapter9 *This ); |
||
69 | |||
70 | HRESULT WINAPI |
||
71 | NineAdapter9_GetAdapterIdentifier( struct NineAdapter9 *This, |
||
72 | DWORD Flags, |
||
73 | D3DADAPTER_IDENTIFIER9 *pIdentifier ); |
||
74 | |||
75 | HRESULT WINAPI |
||
76 | NineAdapter9_CheckDeviceType( struct NineAdapter9 *This, |
||
77 | D3DDEVTYPE DevType, |
||
78 | D3DFORMAT AdapterFormat, |
||
79 | D3DFORMAT BackBufferFormat, |
||
80 | BOOL bWindowed ); |
||
81 | |||
82 | HRESULT WINAPI |
||
83 | NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This, |
||
84 | D3DDEVTYPE DeviceType, |
||
85 | D3DFORMAT AdapterFormat, |
||
86 | DWORD Usage, |
||
87 | D3DRESOURCETYPE RType, |
||
88 | D3DFORMAT CheckFormat ); |
||
89 | |||
90 | HRESULT WINAPI |
||
91 | NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This, |
||
92 | D3DDEVTYPE DeviceType, |
||
93 | D3DFORMAT SurfaceFormat, |
||
94 | BOOL Windowed, |
||
95 | D3DMULTISAMPLE_TYPE MultiSampleType, |
||
96 | DWORD *pQualityLevels ); |
||
97 | |||
98 | HRESULT WINAPI |
||
99 | NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This, |
||
100 | D3DDEVTYPE DeviceType, |
||
101 | D3DFORMAT AdapterFormat, |
||
102 | D3DFORMAT RenderTargetFormat, |
||
103 | D3DFORMAT DepthStencilFormat ); |
||
104 | |||
105 | HRESULT WINAPI |
||
106 | NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This, |
||
107 | D3DDEVTYPE DeviceType, |
||
108 | D3DFORMAT SourceFormat, |
||
109 | D3DFORMAT TargetFormat ); |
||
110 | |||
111 | HRESULT WINAPI |
||
112 | NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This, |
||
113 | D3DDEVTYPE DeviceType, |
||
114 | D3DCAPS9 *pCaps ); |
||
115 | |||
116 | HRESULT WINAPI |
||
117 | NineAdapter9_CreateDevice( struct NineAdapter9 *This, |
||
118 | UINT RealAdapter, |
||
119 | D3DDEVTYPE DeviceType, |
||
120 | HWND hFocusWindow, |
||
121 | DWORD BehaviorFlags, |
||
122 | D3DPRESENT_PARAMETERS *pPresentationParameters, |
||
123 | IDirect3D9 *pD3D9, |
||
124 | ID3DPresentGroup *pPresentationGroup, |
||
125 | IDirect3DDevice9 **ppReturnedDeviceInterface ); |
||
126 | |||
127 | HRESULT WINAPI |
||
128 | NineAdapter9_CreateDeviceEx( struct NineAdapter9 *This, |
||
129 | UINT RealAdapter, |
||
130 | D3DDEVTYPE DeviceType, |
||
131 | HWND hFocusWindow, |
||
132 | DWORD BehaviorFlags, |
||
133 | D3DPRESENT_PARAMETERS *pPresentationParameters, |
||
134 | D3DDISPLAYMODEEX *pFullscreenDisplayMode, |
||
135 | IDirect3D9Ex *pD3D9Ex, |
||
136 | ID3DPresentGroup *pPresentationGroup, |
||
137 | IDirect3DDevice9Ex **ppReturnedDeviceInterface ); |
||
138 | |||
139 | #endif /* _NINE_ADAPTER9_H_ */ |