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_ADAPTER9_H_
24
#define _NINE_ADAPTER9_H_
28
#include "d3dadapter/d3dadapter9.h"
33
struct d3dadapter9_context
35
struct pipe_screen *hal, *ref;
36
D3DADAPTER_IDENTIFIER9 identifier;
37
BOOL linear_framebuffer;
42
BOOL discard_delayed_release;
43
BOOL tearfree_discard;
45
BOOL dynamic_texture_workaround;
46
BOOL shader_inline_constants;
47
int memfd_virtualsizelimit;
48
int override_vram_size;
50
void (*destroy)( struct d3dadapter9_context *ctx );
55
struct NineUnknown base;
57
struct d3dadapter9_context *ctx;
59
static inline struct NineAdapter9 *
60
NineAdapter9( void *data )
62
return (struct NineAdapter9 *)data;
66
NineAdapter9_new( struct d3dadapter9_context *pCTX,
67
struct NineAdapter9 **ppOut );
70
NineAdapter9_ctor( struct NineAdapter9 *This,
71
struct NineUnknownParams *pParams,
72
struct d3dadapter9_context *pCTX );
75
NineAdapter9_dtor( struct NineAdapter9 *This );
78
NineAdapter9_GetAdapterIdentifier( struct NineAdapter9 *This,
80
D3DADAPTER_IDENTIFIER9 *pIdentifier );
83
NineAdapter9_CheckDeviceType( struct NineAdapter9 *This,
85
D3DFORMAT AdapterFormat,
86
D3DFORMAT BackBufferFormat,
90
NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
91
D3DDEVTYPE DeviceType,
92
D3DFORMAT AdapterFormat,
94
D3DRESOURCETYPE RType,
95
D3DFORMAT CheckFormat );
98
NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,
99
D3DDEVTYPE DeviceType,
100
D3DFORMAT SurfaceFormat,
102
D3DMULTISAMPLE_TYPE MultiSampleType,
103
DWORD *pQualityLevels );
106
NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This,
107
D3DDEVTYPE DeviceType,
108
D3DFORMAT AdapterFormat,
109
D3DFORMAT RenderTargetFormat,
110
D3DFORMAT DepthStencilFormat );
113
NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This,
114
D3DDEVTYPE DeviceType,
115
D3DFORMAT SourceFormat,
116
D3DFORMAT TargetFormat );
119
NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
120
D3DDEVTYPE DeviceType,
124
NineAdapter9_CreateDevice( struct NineAdapter9 *This,
126
D3DDEVTYPE DeviceType,
129
D3DPRESENT_PARAMETERS *pPresentationParameters,
131
ID3DPresentGroup *pPresentationGroup,
132
IDirect3DDevice9 **ppReturnedDeviceInterface );
135
NineAdapter9_CreateDeviceEx( struct NineAdapter9 *This,
137
D3DDEVTYPE DeviceType,
140
D3DPRESENT_PARAMETERS *pPresentationParameters,
141
D3DDISPLAYMODEEX *pFullscreenDisplayMode,
142
IDirect3D9Ex *pD3D9Ex,
143
ID3DPresentGroup *pPresentationGroup,
144
IDirect3DDevice9Ex **ppReturnedDeviceInterface );
146
#endif /* _NINE_ADAPTER9_H_ */