1bf215546Sopenharmony_ci/*
2bf215546Sopenharmony_ci * Copyright 2011 Joakim Sindholt <opensource@zhasha.com>
3bf215546Sopenharmony_ci *
4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a
5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"),
6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation
7bf215546Sopenharmony_ci * on the rights to use, copy, modify, merge, publish, distribute, sub
8bf215546Sopenharmony_ci * license, and/or sell copies of the Software, and to permit persons to whom
9bf215546Sopenharmony_ci * the Software is furnished to do so, subject to the following conditions:
10bf215546Sopenharmony_ci *
11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next
12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the
13bf215546Sopenharmony_ci * Software.
14bf215546Sopenharmony_ci *
15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18bf215546Sopenharmony_ci * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
19bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
20bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. */
22bf215546Sopenharmony_ci
23bf215546Sopenharmony_ci#ifndef _NINE_DEVICE9_H_
24bf215546Sopenharmony_ci#define _NINE_DEVICE9_H_
25bf215546Sopenharmony_ci
26bf215546Sopenharmony_ci#include "d3dadapter/d3dadapter9.h"
27bf215546Sopenharmony_ci
28bf215546Sopenharmony_ci#include "iunknown.h"
29bf215546Sopenharmony_ci#include "adapter9.h"
30bf215546Sopenharmony_ci
31bf215546Sopenharmony_ci#include "nine_helpers.h"
32bf215546Sopenharmony_ci#include "nine_memory_helper.h"
33bf215546Sopenharmony_ci#include "nine_state.h"
34bf215546Sopenharmony_ci
35bf215546Sopenharmony_cistruct gen_mipmap_state;
36bf215546Sopenharmony_cistruct hash_table;
37bf215546Sopenharmony_cistruct pipe_screen;
38bf215546Sopenharmony_cistruct pipe_context;
39bf215546Sopenharmony_cistruct cso_context;
40bf215546Sopenharmony_cistruct hud_context;
41bf215546Sopenharmony_cistruct u_upload_mgr;
42bf215546Sopenharmony_cistruct csmt_context;
43bf215546Sopenharmony_ci
44bf215546Sopenharmony_cistruct NineSwapChain9;
45bf215546Sopenharmony_cistruct NineStateBlock9;
46bf215546Sopenharmony_ci
47bf215546Sopenharmony_ci#include "util/list.h"
48bf215546Sopenharmony_ci
49bf215546Sopenharmony_cistruct NineDevice9
50bf215546Sopenharmony_ci{
51bf215546Sopenharmony_ci    struct NineUnknown base;
52bf215546Sopenharmony_ci    boolean ex;
53bf215546Sopenharmony_ci    boolean may_swvp;
54bf215546Sopenharmony_ci
55bf215546Sopenharmony_ci    /* G3D context */
56bf215546Sopenharmony_ci    struct pipe_screen *screen;
57bf215546Sopenharmony_ci    /* For first time upload. No Sync with rendering thread */
58bf215546Sopenharmony_ci    struct pipe_context *pipe_secondary;
59bf215546Sopenharmony_ci    struct pipe_screen *screen_sw;
60bf215546Sopenharmony_ci    struct pipe_context *pipe_sw;
61bf215546Sopenharmony_ci    struct cso_context *cso_sw;
62bf215546Sopenharmony_ci
63bf215546Sopenharmony_ci    /* CSMT context */
64bf215546Sopenharmony_ci    struct csmt_context *csmt_ctx;
65bf215546Sopenharmony_ci    BOOL csmt_active;
66bf215546Sopenharmony_ci
67bf215546Sopenharmony_ci    /* For DISCARD/NOOVERWRITE */
68bf215546Sopenharmony_ci    struct nine_buffer_upload *buffer_upload;
69bf215546Sopenharmony_ci
70bf215546Sopenharmony_ci    /* creation parameters */
71bf215546Sopenharmony_ci    D3DCAPS9 caps;
72bf215546Sopenharmony_ci    D3DDEVICE_CREATION_PARAMETERS params;
73bf215546Sopenharmony_ci    IDirect3D9 *d3d9;
74bf215546Sopenharmony_ci
75bf215546Sopenharmony_ci    /* swapchain stuff */
76bf215546Sopenharmony_ci    ID3DPresentGroup *present;
77bf215546Sopenharmony_ci    struct NineSwapChain9 **swapchains;
78bf215546Sopenharmony_ci    unsigned nswapchains;
79bf215546Sopenharmony_ci
80bf215546Sopenharmony_ci    struct NineStateBlock9 *record;
81bf215546Sopenharmony_ci    struct nine_state *update; /* state to update (&state / &record->state) */
82bf215546Sopenharmony_ci    struct nine_state state;   /* device state */
83bf215546Sopenharmony_ci    struct nine_context context;
84bf215546Sopenharmony_ci    struct nine_state_sw_internal state_sw_internal;
85bf215546Sopenharmony_ci
86bf215546Sopenharmony_ci    struct list_head update_buffers;
87bf215546Sopenharmony_ci    struct list_head update_textures;
88bf215546Sopenharmony_ci    struct list_head managed_buffers;
89bf215546Sopenharmony_ci    struct list_head managed_textures;
90bf215546Sopenharmony_ci
91bf215546Sopenharmony_ci    boolean is_recording;
92bf215546Sopenharmony_ci    boolean in_scene;
93bf215546Sopenharmony_ci    unsigned end_scene_since_present;
94bf215546Sopenharmony_ci
95bf215546Sopenharmony_ci    uint16_t vs_const_size;
96bf215546Sopenharmony_ci    uint16_t ps_const_size;
97bf215546Sopenharmony_ci    uint16_t max_vs_const_f;
98bf215546Sopenharmony_ci    uint16_t max_ps_const_f;
99bf215546Sopenharmony_ci
100bf215546Sopenharmony_ci    struct pipe_resource *dummy_texture;
101bf215546Sopenharmony_ci    struct pipe_sampler_view *dummy_sampler_view;
102bf215546Sopenharmony_ci    struct pipe_sampler_state dummy_sampler_state;
103bf215546Sopenharmony_ci
104bf215546Sopenharmony_ci    struct gen_mipmap_state *gen_mipmap;
105bf215546Sopenharmony_ci
106bf215546Sopenharmony_ci    struct {
107bf215546Sopenharmony_ci        struct hash_table *ht_vs;
108bf215546Sopenharmony_ci        struct hash_table *ht_ps;
109bf215546Sopenharmony_ci        struct NineVertexShader9 *vs;
110bf215546Sopenharmony_ci        struct NinePixelShader9 *ps;
111bf215546Sopenharmony_ci        unsigned num_vs;
112bf215546Sopenharmony_ci        unsigned num_ps;
113bf215546Sopenharmony_ci        float *vs_const;
114bf215546Sopenharmony_ci        float *ps_const;
115bf215546Sopenharmony_ci
116bf215546Sopenharmony_ci        struct hash_table *ht_fvf;
117bf215546Sopenharmony_ci    } ff;
118bf215546Sopenharmony_ci
119bf215546Sopenharmony_ci    struct {
120bf215546Sopenharmony_ci        struct pipe_resource *image;
121bf215546Sopenharmony_ci        unsigned w;
122bf215546Sopenharmony_ci        unsigned h;
123bf215546Sopenharmony_ci        POINT hotspot; /* -1, -1 if no cursor image set */
124bf215546Sopenharmony_ci        POINT pos;
125bf215546Sopenharmony_ci        BOOL visible;
126bf215546Sopenharmony_ci        boolean software;
127bf215546Sopenharmony_ci        void *hw_upload_temp;
128bf215546Sopenharmony_ci    } cursor;
129bf215546Sopenharmony_ci
130bf215546Sopenharmony_ci    struct {
131bf215546Sopenharmony_ci        boolean user_sw_vbufs;
132bf215546Sopenharmony_ci        boolean window_space_position_support;
133bf215546Sopenharmony_ci        boolean vs_integer;
134bf215546Sopenharmony_ci        boolean ps_integer;
135bf215546Sopenharmony_ci        boolean offset_units_unscaled;
136bf215546Sopenharmony_ci    } driver_caps;
137bf215546Sopenharmony_ci
138bf215546Sopenharmony_ci    struct {
139bf215546Sopenharmony_ci        boolean buggy_barycentrics;
140bf215546Sopenharmony_ci    } driver_bugs;
141bf215546Sopenharmony_ci
142bf215546Sopenharmony_ci    struct {
143bf215546Sopenharmony_ci        boolean dynamic_texture_workaround;
144bf215546Sopenharmony_ci    } workarounds;
145bf215546Sopenharmony_ci
146bf215546Sopenharmony_ci    struct u_upload_mgr *vertex_uploader;
147bf215546Sopenharmony_ci
148bf215546Sopenharmony_ci    struct nine_range_pool range_pool;
149bf215546Sopenharmony_ci
150bf215546Sopenharmony_ci    struct hud_context *hud; /* NULL if hud is disabled */
151bf215546Sopenharmony_ci
152bf215546Sopenharmony_ci    struct nine_allocator *allocator;
153bf215546Sopenharmony_ci
154bf215546Sopenharmony_ci    /* dummy vbo (containing 0 0 0 0) to bind if vertex shader input
155bf215546Sopenharmony_ci     * is not bound to anything by the vertex declaration */
156bf215546Sopenharmony_ci    struct pipe_resource *dummy_vbo;
157bf215546Sopenharmony_ci    BOOL device_needs_reset;
158bf215546Sopenharmony_ci    int minor_version_num;
159bf215546Sopenharmony_ci    long long available_texture_mem;
160bf215546Sopenharmony_ci    long long available_texture_limit;
161bf215546Sopenharmony_ci
162bf215546Sopenharmony_ci    /* software vertex processing */
163bf215546Sopenharmony_ci    boolean swvp;
164bf215546Sopenharmony_ci    /* pure device */
165bf215546Sopenharmony_ci    boolean pure;
166bf215546Sopenharmony_ci
167bf215546Sopenharmony_ci    unsigned frame_count; /* It's ok if we overflow */
168bf215546Sopenharmony_ci
169bf215546Sopenharmony_ci    /* Ex */
170bf215546Sopenharmony_ci    int gpu_priority;
171bf215546Sopenharmony_ci    unsigned max_frame_latency;
172bf215546Sopenharmony_ci};
173bf215546Sopenharmony_cistatic inline struct NineDevice9 *
174bf215546Sopenharmony_ciNineDevice9( void *data )
175bf215546Sopenharmony_ci{
176bf215546Sopenharmony_ci    return (struct NineDevice9 *)data;
177bf215546Sopenharmony_ci}
178bf215546Sopenharmony_ci
179bf215546Sopenharmony_ciHRESULT
180bf215546Sopenharmony_ciNineDevice9_new( struct pipe_screen *pScreen,
181bf215546Sopenharmony_ci                 D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
182bf215546Sopenharmony_ci                 D3DCAPS9 *pCaps,
183bf215546Sopenharmony_ci                 D3DPRESENT_PARAMETERS *pPresentationParameters,
184bf215546Sopenharmony_ci                 IDirect3D9 *pD3D9,
185bf215546Sopenharmony_ci                 ID3DPresentGroup *pPresentationGroup,
186bf215546Sopenharmony_ci                 struct d3dadapter9_context *pCTX,
187bf215546Sopenharmony_ci                 boolean ex,
188bf215546Sopenharmony_ci                 D3DDISPLAYMODEEX *pFullscreenDisplayMode,
189bf215546Sopenharmony_ci                 struct NineDevice9 **ppOut,
190bf215546Sopenharmony_ci                 int minorVersionNum );
191bf215546Sopenharmony_ci
192bf215546Sopenharmony_ciHRESULT
193bf215546Sopenharmony_ciNineDevice9_ctor( struct NineDevice9 *This,
194bf215546Sopenharmony_ci                  struct NineUnknownParams *pParams,
195bf215546Sopenharmony_ci                  struct pipe_screen *pScreen,
196bf215546Sopenharmony_ci                  D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
197bf215546Sopenharmony_ci                  D3DCAPS9 *pCaps,
198bf215546Sopenharmony_ci                  D3DPRESENT_PARAMETERS *pPresentationParameters,
199bf215546Sopenharmony_ci                  IDirect3D9 *pD3D9,
200bf215546Sopenharmony_ci                  ID3DPresentGroup *pPresentationGroup,
201bf215546Sopenharmony_ci                  struct d3dadapter9_context *pCTX,
202bf215546Sopenharmony_ci                  boolean ex,
203bf215546Sopenharmony_ci                  D3DDISPLAYMODEEX *pFullscreenDisplayMode,
204bf215546Sopenharmony_ci                  int minorVersionNum );
205bf215546Sopenharmony_ci
206bf215546Sopenharmony_civoid
207bf215546Sopenharmony_ciNineDevice9_dtor( struct NineDevice9 *This );
208bf215546Sopenharmony_ci
209bf215546Sopenharmony_ci/*** Nine private ***/
210bf215546Sopenharmony_cistruct pipe_resource *
211bf215546Sopenharmony_cinine_resource_create_with_retry( struct NineDevice9 *This,
212bf215546Sopenharmony_ci                                 struct pipe_screen *screen,
213bf215546Sopenharmony_ci                                 const struct pipe_resource *templat );
214bf215546Sopenharmony_ci
215bf215546Sopenharmony_civoid
216bf215546Sopenharmony_ciNineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset );
217bf215546Sopenharmony_ci
218bf215546Sopenharmony_cistruct pipe_screen *
219bf215546Sopenharmony_ciNineDevice9_GetScreen( struct NineDevice9 *This );
220bf215546Sopenharmony_ci
221bf215546Sopenharmony_cistruct pipe_context *
222bf215546Sopenharmony_ciNineDevice9_GetPipe( struct NineDevice9 *This );
223bf215546Sopenharmony_ci
224bf215546Sopenharmony_ciconst D3DCAPS9 *
225bf215546Sopenharmony_ciNineDevice9_GetCaps( struct NineDevice9 *This );
226bf215546Sopenharmony_ci
227bf215546Sopenharmony_civoid
228bf215546Sopenharmony_ciNineDevice9_EvictManagedResourcesInternal( struct NineDevice9 *This );
229bf215546Sopenharmony_ci
230bf215546Sopenharmony_ci/*** Direct3D public ***/
231bf215546Sopenharmony_ci
232bf215546Sopenharmony_ciHRESULT NINE_WINAPI
233bf215546Sopenharmony_ciNineDevice9_TestCooperativeLevel( struct NineDevice9 *This );
234bf215546Sopenharmony_ci
235bf215546Sopenharmony_ciUINT NINE_WINAPI
236bf215546Sopenharmony_ciNineDevice9_GetAvailableTextureMem( struct NineDevice9 *This );
237bf215546Sopenharmony_ci
238bf215546Sopenharmony_ciHRESULT NINE_WINAPI
239bf215546Sopenharmony_ciNineDevice9_EvictManagedResources( struct NineDevice9 *This );
240bf215546Sopenharmony_ci
241bf215546Sopenharmony_ciHRESULT NINE_WINAPI
242bf215546Sopenharmony_ciNineDevice9_GetDirect3D( struct NineDevice9 *This,
243bf215546Sopenharmony_ci                         IDirect3D9 **ppD3D9 );
244bf215546Sopenharmony_ci
245bf215546Sopenharmony_ciHRESULT NINE_WINAPI
246bf215546Sopenharmony_ciNineDevice9_GetDeviceCaps( struct NineDevice9 *This,
247bf215546Sopenharmony_ci                           D3DCAPS9 *pCaps );
248bf215546Sopenharmony_ci
249bf215546Sopenharmony_ciHRESULT NINE_WINAPI
250bf215546Sopenharmony_ciNineDevice9_GetDisplayMode( struct NineDevice9 *This,
251bf215546Sopenharmony_ci                            UINT iSwapChain,
252bf215546Sopenharmony_ci                            D3DDISPLAYMODE *pMode );
253bf215546Sopenharmony_ci
254bf215546Sopenharmony_ciHRESULT NINE_WINAPI
255bf215546Sopenharmony_ciNineDevice9_GetCreationParameters( struct NineDevice9 *This,
256bf215546Sopenharmony_ci                                   D3DDEVICE_CREATION_PARAMETERS *pParameters );
257bf215546Sopenharmony_ci
258bf215546Sopenharmony_ciHRESULT NINE_WINAPI
259bf215546Sopenharmony_ciNineDevice9_SetCursorProperties( struct NineDevice9 *This,
260bf215546Sopenharmony_ci                                 UINT XHotSpot,
261bf215546Sopenharmony_ci                                 UINT YHotSpot,
262bf215546Sopenharmony_ci                                 IDirect3DSurface9 *pCursorBitmap );
263bf215546Sopenharmony_ci
264bf215546Sopenharmony_civoid NINE_WINAPI
265bf215546Sopenharmony_ciNineDevice9_SetCursorPosition( struct NineDevice9 *This,
266bf215546Sopenharmony_ci                               int X,
267bf215546Sopenharmony_ci                               int Y,
268bf215546Sopenharmony_ci                               DWORD Flags );
269bf215546Sopenharmony_ci
270bf215546Sopenharmony_ciBOOL NINE_WINAPI
271bf215546Sopenharmony_ciNineDevice9_ShowCursor( struct NineDevice9 *This,
272bf215546Sopenharmony_ci                        BOOL bShow );
273bf215546Sopenharmony_ci
274bf215546Sopenharmony_ciHRESULT NINE_WINAPI
275bf215546Sopenharmony_ciNineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
276bf215546Sopenharmony_ci                                       D3DPRESENT_PARAMETERS *pPresentationParameters,
277bf215546Sopenharmony_ci                                       IDirect3DSwapChain9 **pSwapChain );
278bf215546Sopenharmony_ci
279bf215546Sopenharmony_ciHRESULT NINE_WINAPI
280bf215546Sopenharmony_ciNineDevice9_GetSwapChain( struct NineDevice9 *This,
281bf215546Sopenharmony_ci                          UINT iSwapChain,
282bf215546Sopenharmony_ci                          IDirect3DSwapChain9 **pSwapChain );
283bf215546Sopenharmony_ci
284bf215546Sopenharmony_ciUINT NINE_WINAPI
285bf215546Sopenharmony_ciNineDevice9_GetNumberOfSwapChains( struct NineDevice9 *This );
286bf215546Sopenharmony_ci
287bf215546Sopenharmony_ciHRESULT NINE_WINAPI
288bf215546Sopenharmony_ciNineDevice9_Reset( struct NineDevice9 *This,
289bf215546Sopenharmony_ci                   D3DPRESENT_PARAMETERS *pPresentationParameters );
290bf215546Sopenharmony_ci
291bf215546Sopenharmony_ciHRESULT NINE_WINAPI
292bf215546Sopenharmony_ciNineDevice9_Present( struct NineDevice9 *This,
293bf215546Sopenharmony_ci                     const RECT *pSourceRect,
294bf215546Sopenharmony_ci                     const RECT *pDestRect,
295bf215546Sopenharmony_ci                     HWND hDestWindowOverride,
296bf215546Sopenharmony_ci                     const RGNDATA *pDirtyRegion );
297bf215546Sopenharmony_ci
298bf215546Sopenharmony_ciHRESULT NINE_WINAPI
299bf215546Sopenharmony_ciNineDevice9_GetBackBuffer( struct NineDevice9 *This,
300bf215546Sopenharmony_ci                           UINT iSwapChain,
301bf215546Sopenharmony_ci                           UINT iBackBuffer,
302bf215546Sopenharmony_ci                           D3DBACKBUFFER_TYPE Type,
303bf215546Sopenharmony_ci                           IDirect3DSurface9 **ppBackBuffer );
304bf215546Sopenharmony_ci
305bf215546Sopenharmony_ciHRESULT NINE_WINAPI
306bf215546Sopenharmony_ciNineDevice9_GetRasterStatus( struct NineDevice9 *This,
307bf215546Sopenharmony_ci                             UINT iSwapChain,
308bf215546Sopenharmony_ci                             D3DRASTER_STATUS *pRasterStatus );
309bf215546Sopenharmony_ci
310bf215546Sopenharmony_ciHRESULT NINE_WINAPI
311bf215546Sopenharmony_ciNineDevice9_SetDialogBoxMode( struct NineDevice9 *This,
312bf215546Sopenharmony_ci                              BOOL bEnableDialogs );
313bf215546Sopenharmony_ci
314bf215546Sopenharmony_civoid NINE_WINAPI
315bf215546Sopenharmony_ciNineDevice9_SetGammaRamp( struct NineDevice9 *This,
316bf215546Sopenharmony_ci                          UINT iSwapChain,
317bf215546Sopenharmony_ci                          DWORD Flags,
318bf215546Sopenharmony_ci                          const D3DGAMMARAMP *pRamp );
319bf215546Sopenharmony_ci
320bf215546Sopenharmony_civoid NINE_WINAPI
321bf215546Sopenharmony_ciNineDevice9_GetGammaRamp( struct NineDevice9 *This,
322bf215546Sopenharmony_ci                          UINT iSwapChain,
323bf215546Sopenharmony_ci                          D3DGAMMARAMP *pRamp );
324bf215546Sopenharmony_ci
325bf215546Sopenharmony_ciHRESULT NINE_WINAPI
326bf215546Sopenharmony_ciNineDevice9_CreateTexture( struct NineDevice9 *This,
327bf215546Sopenharmony_ci                           UINT Width,
328bf215546Sopenharmony_ci                           UINT Height,
329bf215546Sopenharmony_ci                           UINT Levels,
330bf215546Sopenharmony_ci                           DWORD Usage,
331bf215546Sopenharmony_ci                           D3DFORMAT Format,
332bf215546Sopenharmony_ci                           D3DPOOL Pool,
333bf215546Sopenharmony_ci                           IDirect3DTexture9 **ppTexture,
334bf215546Sopenharmony_ci                           HANDLE *pSharedHandle );
335bf215546Sopenharmony_ci
336bf215546Sopenharmony_ciHRESULT NINE_WINAPI
337bf215546Sopenharmony_ciNineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
338bf215546Sopenharmony_ci                                 UINT Width,
339bf215546Sopenharmony_ci                                 UINT Height,
340bf215546Sopenharmony_ci                                 UINT Depth,
341bf215546Sopenharmony_ci                                 UINT Levels,
342bf215546Sopenharmony_ci                                 DWORD Usage,
343bf215546Sopenharmony_ci                                 D3DFORMAT Format,
344bf215546Sopenharmony_ci                                 D3DPOOL Pool,
345bf215546Sopenharmony_ci                                 IDirect3DVolumeTexture9 **ppVolumeTexture,
346bf215546Sopenharmony_ci                                 HANDLE *pSharedHandle );
347bf215546Sopenharmony_ci
348bf215546Sopenharmony_ciHRESULT NINE_WINAPI
349bf215546Sopenharmony_ciNineDevice9_CreateCubeTexture( struct NineDevice9 *This,
350bf215546Sopenharmony_ci                               UINT EdgeLength,
351bf215546Sopenharmony_ci                               UINT Levels,
352bf215546Sopenharmony_ci                               DWORD Usage,
353bf215546Sopenharmony_ci                               D3DFORMAT Format,
354bf215546Sopenharmony_ci                               D3DPOOL Pool,
355bf215546Sopenharmony_ci                               IDirect3DCubeTexture9 **ppCubeTexture,
356bf215546Sopenharmony_ci                               HANDLE *pSharedHandle );
357bf215546Sopenharmony_ci
358bf215546Sopenharmony_ciHRESULT NINE_WINAPI
359bf215546Sopenharmony_ciNineDevice9_CreateVertexBuffer( struct NineDevice9 *This,
360bf215546Sopenharmony_ci                                UINT Length,
361bf215546Sopenharmony_ci                                DWORD Usage,
362bf215546Sopenharmony_ci                                DWORD FVF,
363bf215546Sopenharmony_ci                                D3DPOOL Pool,
364bf215546Sopenharmony_ci                                IDirect3DVertexBuffer9 **ppVertexBuffer,
365bf215546Sopenharmony_ci                                HANDLE *pSharedHandle );
366bf215546Sopenharmony_ci
367bf215546Sopenharmony_ciHRESULT NINE_WINAPI
368bf215546Sopenharmony_ciNineDevice9_CreateIndexBuffer( struct NineDevice9 *This,
369bf215546Sopenharmony_ci                               UINT Length,
370bf215546Sopenharmony_ci                               DWORD Usage,
371bf215546Sopenharmony_ci                               D3DFORMAT Format,
372bf215546Sopenharmony_ci                               D3DPOOL Pool,
373bf215546Sopenharmony_ci                               IDirect3DIndexBuffer9 **ppIndexBuffer,
374bf215546Sopenharmony_ci                               HANDLE *pSharedHandle );
375bf215546Sopenharmony_ci
376bf215546Sopenharmony_ciHRESULT NINE_WINAPI
377bf215546Sopenharmony_ciNineDevice9_CreateRenderTarget( struct NineDevice9 *This,
378bf215546Sopenharmony_ci                                UINT Width,
379bf215546Sopenharmony_ci                                UINT Height,
380bf215546Sopenharmony_ci                                D3DFORMAT Format,
381bf215546Sopenharmony_ci                                D3DMULTISAMPLE_TYPE MultiSample,
382bf215546Sopenharmony_ci                                DWORD MultisampleQuality,
383bf215546Sopenharmony_ci                                BOOL Lockable,
384bf215546Sopenharmony_ci                                IDirect3DSurface9 **ppSurface,
385bf215546Sopenharmony_ci                                HANDLE *pSharedHandle );
386bf215546Sopenharmony_ci
387bf215546Sopenharmony_ciHRESULT NINE_WINAPI
388bf215546Sopenharmony_ciNineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
389bf215546Sopenharmony_ci                                       UINT Width,
390bf215546Sopenharmony_ci                                       UINT Height,
391bf215546Sopenharmony_ci                                       D3DFORMAT Format,
392bf215546Sopenharmony_ci                                       D3DMULTISAMPLE_TYPE MultiSample,
393bf215546Sopenharmony_ci                                       DWORD MultisampleQuality,
394bf215546Sopenharmony_ci                                       BOOL Discard,
395bf215546Sopenharmony_ci                                       IDirect3DSurface9 **ppSurface,
396bf215546Sopenharmony_ci                                       HANDLE *pSharedHandle );
397bf215546Sopenharmony_ci
398bf215546Sopenharmony_ciHRESULT NINE_WINAPI
399bf215546Sopenharmony_ciNineDevice9_UpdateSurface( struct NineDevice9 *This,
400bf215546Sopenharmony_ci                           IDirect3DSurface9 *pSourceSurface,
401bf215546Sopenharmony_ci                           const RECT *pSourceRect,
402bf215546Sopenharmony_ci                           IDirect3DSurface9 *pDestinationSurface,
403bf215546Sopenharmony_ci                           const POINT *pDestPoint );
404bf215546Sopenharmony_ci
405bf215546Sopenharmony_ciHRESULT NINE_WINAPI
406bf215546Sopenharmony_ciNineDevice9_UpdateTexture( struct NineDevice9 *This,
407bf215546Sopenharmony_ci                           IDirect3DBaseTexture9 *pSourceTexture,
408bf215546Sopenharmony_ci                           IDirect3DBaseTexture9 *pDestinationTexture );
409bf215546Sopenharmony_ci
410bf215546Sopenharmony_ciHRESULT NINE_WINAPI
411bf215546Sopenharmony_ciNineDevice9_GetRenderTargetData( struct NineDevice9 *This,
412bf215546Sopenharmony_ci                                 IDirect3DSurface9 *pRenderTarget,
413bf215546Sopenharmony_ci                                 IDirect3DSurface9 *pDestSurface );
414bf215546Sopenharmony_ci
415bf215546Sopenharmony_ciHRESULT NINE_WINAPI
416bf215546Sopenharmony_ciNineDevice9_GetFrontBufferData( struct NineDevice9 *This,
417bf215546Sopenharmony_ci                                UINT iSwapChain,
418bf215546Sopenharmony_ci                                IDirect3DSurface9 *pDestSurface );
419bf215546Sopenharmony_ci
420bf215546Sopenharmony_ciHRESULT NINE_WINAPI
421bf215546Sopenharmony_ciNineDevice9_StretchRect( struct NineDevice9 *This,
422bf215546Sopenharmony_ci                         IDirect3DSurface9 *pSourceSurface,
423bf215546Sopenharmony_ci                         const RECT *pSourceRect,
424bf215546Sopenharmony_ci                         IDirect3DSurface9 *pDestSurface,
425bf215546Sopenharmony_ci                         const RECT *pDestRect,
426bf215546Sopenharmony_ci                         D3DTEXTUREFILTERTYPE Filter );
427bf215546Sopenharmony_ci
428bf215546Sopenharmony_ciHRESULT NINE_WINAPI
429bf215546Sopenharmony_ciNineDevice9_ColorFill( struct NineDevice9 *This,
430bf215546Sopenharmony_ci                       IDirect3DSurface9 *pSurface,
431bf215546Sopenharmony_ci                       const RECT *pRect,
432bf215546Sopenharmony_ci                       D3DCOLOR color );
433bf215546Sopenharmony_ci
434bf215546Sopenharmony_ciHRESULT NINE_WINAPI
435bf215546Sopenharmony_ciNineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
436bf215546Sopenharmony_ci                                         UINT Width,
437bf215546Sopenharmony_ci                                         UINT Height,
438bf215546Sopenharmony_ci                                         D3DFORMAT Format,
439bf215546Sopenharmony_ci                                         D3DPOOL Pool,
440bf215546Sopenharmony_ci                                         IDirect3DSurface9 **ppSurface,
441bf215546Sopenharmony_ci                                         HANDLE *pSharedHandle );
442bf215546Sopenharmony_ci
443bf215546Sopenharmony_ciHRESULT NINE_WINAPI
444bf215546Sopenharmony_ciNineDevice9_SetRenderTarget( struct NineDevice9 *This,
445bf215546Sopenharmony_ci                             DWORD RenderTargetIndex,
446bf215546Sopenharmony_ci                             IDirect3DSurface9 *pRenderTarget );
447bf215546Sopenharmony_ci
448bf215546Sopenharmony_ciHRESULT NINE_WINAPI
449bf215546Sopenharmony_ciNineDevice9_GetRenderTarget( struct NineDevice9 *This,
450bf215546Sopenharmony_ci                             DWORD RenderTargetIndex,
451bf215546Sopenharmony_ci                             IDirect3DSurface9 **ppRenderTarget );
452bf215546Sopenharmony_ci
453bf215546Sopenharmony_ciHRESULT NINE_WINAPI
454bf215546Sopenharmony_ciNineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
455bf215546Sopenharmony_ci                                    IDirect3DSurface9 *pNewZStencil );
456bf215546Sopenharmony_ci
457bf215546Sopenharmony_ciHRESULT NINE_WINAPI
458bf215546Sopenharmony_ciNineDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
459bf215546Sopenharmony_ci                                    IDirect3DSurface9 **ppZStencilSurface );
460bf215546Sopenharmony_ci
461bf215546Sopenharmony_ciHRESULT NINE_WINAPI
462bf215546Sopenharmony_ciNineDevice9_BeginScene( struct NineDevice9 *This );
463bf215546Sopenharmony_ci
464bf215546Sopenharmony_ciHRESULT NINE_WINAPI
465bf215546Sopenharmony_ciNineDevice9_EndScene( struct NineDevice9 *This );
466bf215546Sopenharmony_ci
467bf215546Sopenharmony_ciHRESULT NINE_WINAPI
468bf215546Sopenharmony_ciNineDevice9_Clear( struct NineDevice9 *This,
469bf215546Sopenharmony_ci                   DWORD Count,
470bf215546Sopenharmony_ci                   const D3DRECT *pRects,
471bf215546Sopenharmony_ci                   DWORD Flags,
472bf215546Sopenharmony_ci                   D3DCOLOR Color,
473bf215546Sopenharmony_ci                   float Z,
474bf215546Sopenharmony_ci                   DWORD Stencil );
475bf215546Sopenharmony_ci
476bf215546Sopenharmony_ciHRESULT NINE_WINAPI
477bf215546Sopenharmony_ciNineDevice9_SetTransform( struct NineDevice9 *This,
478bf215546Sopenharmony_ci                          D3DTRANSFORMSTATETYPE State,
479bf215546Sopenharmony_ci                          const D3DMATRIX *pMatrix );
480bf215546Sopenharmony_ci
481bf215546Sopenharmony_ciHRESULT NINE_WINAPI
482bf215546Sopenharmony_ciNineDevice9_GetTransform( struct NineDevice9 *This,
483bf215546Sopenharmony_ci                          D3DTRANSFORMSTATETYPE State,
484bf215546Sopenharmony_ci                          D3DMATRIX *pMatrix );
485bf215546Sopenharmony_ci
486bf215546Sopenharmony_ciHRESULT NINE_WINAPI
487bf215546Sopenharmony_ciNineDevice9_MultiplyTransform( struct NineDevice9 *This,
488bf215546Sopenharmony_ci                               D3DTRANSFORMSTATETYPE State,
489bf215546Sopenharmony_ci                               const D3DMATRIX *pMatrix );
490bf215546Sopenharmony_ci
491bf215546Sopenharmony_ciHRESULT NINE_WINAPI
492bf215546Sopenharmony_ciNineDevice9_SetViewport( struct NineDevice9 *This,
493bf215546Sopenharmony_ci                         const D3DVIEWPORT9 *pViewport );
494bf215546Sopenharmony_ci
495bf215546Sopenharmony_ciHRESULT NINE_WINAPI
496bf215546Sopenharmony_ciNineDevice9_GetViewport( struct NineDevice9 *This,
497bf215546Sopenharmony_ci                         D3DVIEWPORT9 *pViewport );
498bf215546Sopenharmony_ci
499bf215546Sopenharmony_ciHRESULT NINE_WINAPI
500bf215546Sopenharmony_ciNineDevice9_SetMaterial( struct NineDevice9 *This,
501bf215546Sopenharmony_ci                         const D3DMATERIAL9 *pMaterial );
502bf215546Sopenharmony_ci
503bf215546Sopenharmony_ciHRESULT NINE_WINAPI
504bf215546Sopenharmony_ciNineDevice9_GetMaterial( struct NineDevice9 *This,
505bf215546Sopenharmony_ci                         D3DMATERIAL9 *pMaterial );
506bf215546Sopenharmony_ci
507bf215546Sopenharmony_ciHRESULT NINE_WINAPI
508bf215546Sopenharmony_ciNineDevice9_SetLight( struct NineDevice9 *This,
509bf215546Sopenharmony_ci                      DWORD Index,
510bf215546Sopenharmony_ci                      const D3DLIGHT9 *pLight );
511bf215546Sopenharmony_ci
512bf215546Sopenharmony_ciHRESULT NINE_WINAPI
513bf215546Sopenharmony_ciNineDevice9_GetLight( struct NineDevice9 *This,
514bf215546Sopenharmony_ci                      DWORD Index,
515bf215546Sopenharmony_ci                      D3DLIGHT9 *pLight );
516bf215546Sopenharmony_ci
517bf215546Sopenharmony_ciHRESULT NINE_WINAPI
518bf215546Sopenharmony_ciNineDevice9_LightEnable( struct NineDevice9 *This,
519bf215546Sopenharmony_ci                         DWORD Index,
520bf215546Sopenharmony_ci                         BOOL Enable );
521bf215546Sopenharmony_ci
522bf215546Sopenharmony_ciHRESULT NINE_WINAPI
523bf215546Sopenharmony_ciNineDevice9_GetLightEnable( struct NineDevice9 *This,
524bf215546Sopenharmony_ci                            DWORD Index,
525bf215546Sopenharmony_ci                            BOOL *pEnable );
526bf215546Sopenharmony_ci
527bf215546Sopenharmony_ciHRESULT NINE_WINAPI
528bf215546Sopenharmony_ciNineDevice9_SetClipPlane( struct NineDevice9 *This,
529bf215546Sopenharmony_ci                          DWORD Index,
530bf215546Sopenharmony_ci                          const float *pPlane );
531bf215546Sopenharmony_ci
532bf215546Sopenharmony_ciHRESULT NINE_WINAPI
533bf215546Sopenharmony_ciNineDevice9_GetClipPlane( struct NineDevice9 *This,
534bf215546Sopenharmony_ci                          DWORD Index,
535bf215546Sopenharmony_ci                          float *pPlane );
536bf215546Sopenharmony_ci
537bf215546Sopenharmony_ciHRESULT NINE_WINAPI
538bf215546Sopenharmony_ciNineDevice9_SetRenderState( struct NineDevice9 *This,
539bf215546Sopenharmony_ci                            D3DRENDERSTATETYPE State,
540bf215546Sopenharmony_ci                            DWORD Value );
541bf215546Sopenharmony_ci
542bf215546Sopenharmony_ciHRESULT NINE_WINAPI
543bf215546Sopenharmony_ciNineDevice9_GetRenderState( struct NineDevice9 *This,
544bf215546Sopenharmony_ci                            D3DRENDERSTATETYPE State,
545bf215546Sopenharmony_ci                            DWORD *pValue );
546bf215546Sopenharmony_ci
547bf215546Sopenharmony_ciHRESULT NINE_WINAPI
548bf215546Sopenharmony_ciNineDevice9_CreateStateBlock( struct NineDevice9 *This,
549bf215546Sopenharmony_ci                              D3DSTATEBLOCKTYPE Type,
550bf215546Sopenharmony_ci                              IDirect3DStateBlock9 **ppSB );
551bf215546Sopenharmony_ci
552bf215546Sopenharmony_ciHRESULT NINE_WINAPI
553bf215546Sopenharmony_ciNineDevice9_BeginStateBlock( struct NineDevice9 *This );
554bf215546Sopenharmony_ci
555bf215546Sopenharmony_ciHRESULT NINE_WINAPI
556bf215546Sopenharmony_ciNineDevice9_EndStateBlock( struct NineDevice9 *This,
557bf215546Sopenharmony_ci                           IDirect3DStateBlock9 **ppSB );
558bf215546Sopenharmony_ci
559bf215546Sopenharmony_ciHRESULT NINE_WINAPI
560bf215546Sopenharmony_ciNineDevice9_SetClipStatus( struct NineDevice9 *This,
561bf215546Sopenharmony_ci                           const D3DCLIPSTATUS9 *pClipStatus );
562bf215546Sopenharmony_ci
563bf215546Sopenharmony_ciHRESULT NINE_WINAPI
564bf215546Sopenharmony_ciNineDevice9_GetClipStatus( struct NineDevice9 *This,
565bf215546Sopenharmony_ci                           D3DCLIPSTATUS9 *pClipStatus );
566bf215546Sopenharmony_ci
567bf215546Sopenharmony_ciHRESULT NINE_WINAPI
568bf215546Sopenharmony_ciNineDevice9_GetTexture( struct NineDevice9 *This,
569bf215546Sopenharmony_ci                        DWORD Stage,
570bf215546Sopenharmony_ci                        IDirect3DBaseTexture9 **ppTexture );
571bf215546Sopenharmony_ci
572bf215546Sopenharmony_ciHRESULT NINE_WINAPI
573bf215546Sopenharmony_ciNineDevice9_SetTexture( struct NineDevice9 *This,
574bf215546Sopenharmony_ci                        DWORD Stage,
575bf215546Sopenharmony_ci                        IDirect3DBaseTexture9 *pTexture );
576bf215546Sopenharmony_ci
577bf215546Sopenharmony_ciHRESULT NINE_WINAPI
578bf215546Sopenharmony_ciNineDevice9_GetTextureStageState( struct NineDevice9 *This,
579bf215546Sopenharmony_ci                                  DWORD Stage,
580bf215546Sopenharmony_ci                                  D3DTEXTURESTAGESTATETYPE Type,
581bf215546Sopenharmony_ci                                  DWORD *pValue );
582bf215546Sopenharmony_ci
583bf215546Sopenharmony_ciHRESULT NINE_WINAPI
584bf215546Sopenharmony_ciNineDevice9_SetTextureStageState( struct NineDevice9 *This,
585bf215546Sopenharmony_ci                                  DWORD Stage,
586bf215546Sopenharmony_ci                                  D3DTEXTURESTAGESTATETYPE Type,
587bf215546Sopenharmony_ci                                  DWORD Value );
588bf215546Sopenharmony_ci
589bf215546Sopenharmony_ciHRESULT NINE_WINAPI
590bf215546Sopenharmony_ciNineDevice9_GetSamplerState( struct NineDevice9 *This,
591bf215546Sopenharmony_ci                             DWORD Sampler,
592bf215546Sopenharmony_ci                             D3DSAMPLERSTATETYPE Type,
593bf215546Sopenharmony_ci                             DWORD *pValue );
594bf215546Sopenharmony_ci
595bf215546Sopenharmony_ciHRESULT NINE_WINAPI
596bf215546Sopenharmony_ciNineDevice9_SetSamplerState( struct NineDevice9 *This,
597bf215546Sopenharmony_ci                             DWORD Sampler,
598bf215546Sopenharmony_ci                             D3DSAMPLERSTATETYPE Type,
599bf215546Sopenharmony_ci                             DWORD Value );
600bf215546Sopenharmony_ci
601bf215546Sopenharmony_ciHRESULT NINE_WINAPI
602bf215546Sopenharmony_ciNineDevice9_ValidateDevice( struct NineDevice9 *This,
603bf215546Sopenharmony_ci                            DWORD *pNumPasses );
604bf215546Sopenharmony_ci
605bf215546Sopenharmony_ciHRESULT NINE_WINAPI
606bf215546Sopenharmony_ciNineDevice9_SetPaletteEntries( struct NineDevice9 *This,
607bf215546Sopenharmony_ci                               UINT PaletteNumber,
608bf215546Sopenharmony_ci                               const PALETTEENTRY *pEntries );
609bf215546Sopenharmony_ci
610bf215546Sopenharmony_ciHRESULT NINE_WINAPI
611bf215546Sopenharmony_ciNineDevice9_GetPaletteEntries( struct NineDevice9 *This,
612bf215546Sopenharmony_ci                               UINT PaletteNumber,
613bf215546Sopenharmony_ci                               PALETTEENTRY *pEntries );
614bf215546Sopenharmony_ci
615bf215546Sopenharmony_ciHRESULT NINE_WINAPI
616bf215546Sopenharmony_ciNineDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,
617bf215546Sopenharmony_ci                                      UINT PaletteNumber );
618bf215546Sopenharmony_ci
619bf215546Sopenharmony_ciHRESULT NINE_WINAPI
620bf215546Sopenharmony_ciNineDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,
621bf215546Sopenharmony_ci                                      UINT *PaletteNumber );
622bf215546Sopenharmony_ci
623bf215546Sopenharmony_ciHRESULT NINE_WINAPI
624bf215546Sopenharmony_ciNineDevice9_SetScissorRect( struct NineDevice9 *This,
625bf215546Sopenharmony_ci                            const RECT *pRect );
626bf215546Sopenharmony_ci
627bf215546Sopenharmony_ciHRESULT NINE_WINAPI
628bf215546Sopenharmony_ciNineDevice9_GetScissorRect( struct NineDevice9 *This,
629bf215546Sopenharmony_ci                            RECT *pRect );
630bf215546Sopenharmony_ci
631bf215546Sopenharmony_ciHRESULT NINE_WINAPI
632bf215546Sopenharmony_ciNineDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
633bf215546Sopenharmony_ci                                         BOOL bSoftware );
634bf215546Sopenharmony_ci
635bf215546Sopenharmony_ciBOOL NINE_WINAPI
636bf215546Sopenharmony_ciNineDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This );
637bf215546Sopenharmony_ci
638bf215546Sopenharmony_ciHRESULT NINE_WINAPI
639bf215546Sopenharmony_ciNineDevice9_SetNPatchMode( struct NineDevice9 *This,
640bf215546Sopenharmony_ci                           float nSegments );
641bf215546Sopenharmony_ci
642bf215546Sopenharmony_cifloat NINE_WINAPI
643bf215546Sopenharmony_ciNineDevice9_GetNPatchMode( struct NineDevice9 *This );
644bf215546Sopenharmony_ci
645bf215546Sopenharmony_ciHRESULT NINE_WINAPI
646bf215546Sopenharmony_ciNineDevice9_DrawPrimitive( struct NineDevice9 *This,
647bf215546Sopenharmony_ci                           D3DPRIMITIVETYPE PrimitiveType,
648bf215546Sopenharmony_ci                           UINT StartVertex,
649bf215546Sopenharmony_ci                           UINT PrimitiveCount );
650bf215546Sopenharmony_ci
651bf215546Sopenharmony_ciHRESULT NINE_WINAPI
652bf215546Sopenharmony_ciNineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
653bf215546Sopenharmony_ci                                  D3DPRIMITIVETYPE PrimitiveType,
654bf215546Sopenharmony_ci                                  INT BaseVertexIndex,
655bf215546Sopenharmony_ci                                  UINT MinVertexIndex,
656bf215546Sopenharmony_ci                                  UINT NumVertices,
657bf215546Sopenharmony_ci                                  UINT startIndex,
658bf215546Sopenharmony_ci                                  UINT primCount );
659bf215546Sopenharmony_ci
660bf215546Sopenharmony_ciHRESULT NINE_WINAPI
661bf215546Sopenharmony_ciNineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
662bf215546Sopenharmony_ci                             D3DPRIMITIVETYPE PrimitiveType,
663bf215546Sopenharmony_ci                             UINT PrimitiveCount,
664bf215546Sopenharmony_ci                             const void *pVertexStreamZeroData,
665bf215546Sopenharmony_ci                             UINT VertexStreamZeroStride );
666bf215546Sopenharmony_ci
667bf215546Sopenharmony_ciHRESULT NINE_WINAPI
668bf215546Sopenharmony_ciNineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
669bf215546Sopenharmony_ci                                    D3DPRIMITIVETYPE PrimitiveType,
670bf215546Sopenharmony_ci                                    UINT MinVertexIndex,
671bf215546Sopenharmony_ci                                    UINT NumVertices,
672bf215546Sopenharmony_ci                                    UINT PrimitiveCount,
673bf215546Sopenharmony_ci                                    const void *pIndexData,
674bf215546Sopenharmony_ci                                    D3DFORMAT IndexDataFormat,
675bf215546Sopenharmony_ci                                    const void *pVertexStreamZeroData,
676bf215546Sopenharmony_ci                                    UINT VertexStreamZeroStride );
677bf215546Sopenharmony_ci
678bf215546Sopenharmony_ciHRESULT NINE_WINAPI
679bf215546Sopenharmony_ciNineDevice9_ProcessVertices( struct NineDevice9 *This,
680bf215546Sopenharmony_ci                             UINT SrcStartIndex,
681bf215546Sopenharmony_ci                             UINT DestIndex,
682bf215546Sopenharmony_ci                             UINT VertexCount,
683bf215546Sopenharmony_ci                             IDirect3DVertexBuffer9 *pDestBuffer,
684bf215546Sopenharmony_ci                             IDirect3DVertexDeclaration9 *pVertexDecl,
685bf215546Sopenharmony_ci                             DWORD Flags );
686bf215546Sopenharmony_ci
687bf215546Sopenharmony_ciHRESULT NINE_WINAPI
688bf215546Sopenharmony_ciNineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
689bf215546Sopenharmony_ci                                     const D3DVERTEXELEMENT9 *pVertexElements,
690bf215546Sopenharmony_ci                                     IDirect3DVertexDeclaration9 **ppDecl );
691bf215546Sopenharmony_ci
692bf215546Sopenharmony_ciHRESULT NINE_WINAPI
693bf215546Sopenharmony_ciNineDevice9_SetVertexDeclaration( struct NineDevice9 *This,
694bf215546Sopenharmony_ci                                  IDirect3DVertexDeclaration9 *pDecl );
695bf215546Sopenharmony_ci
696bf215546Sopenharmony_ciHRESULT NINE_WINAPI
697bf215546Sopenharmony_ciNineDevice9_GetVertexDeclaration( struct NineDevice9 *This,
698bf215546Sopenharmony_ci                                  IDirect3DVertexDeclaration9 **ppDecl );
699bf215546Sopenharmony_ci
700bf215546Sopenharmony_ciHRESULT NINE_WINAPI
701bf215546Sopenharmony_ciNineDevice9_SetFVF( struct NineDevice9 *This,
702bf215546Sopenharmony_ci                    DWORD FVF );
703bf215546Sopenharmony_ci
704bf215546Sopenharmony_ciHRESULT NINE_WINAPI
705bf215546Sopenharmony_ciNineDevice9_GetFVF( struct NineDevice9 *This,
706bf215546Sopenharmony_ci                    DWORD *pFVF );
707bf215546Sopenharmony_ci
708bf215546Sopenharmony_ciHRESULT NINE_WINAPI
709bf215546Sopenharmony_ciNineDevice9_CreateVertexShader( struct NineDevice9 *This,
710bf215546Sopenharmony_ci                                const DWORD *pFunction,
711bf215546Sopenharmony_ci                                IDirect3DVertexShader9 **ppShader );
712bf215546Sopenharmony_ci
713bf215546Sopenharmony_ciHRESULT NINE_WINAPI
714bf215546Sopenharmony_ciNineDevice9_SetVertexShader( struct NineDevice9 *This,
715bf215546Sopenharmony_ci                             IDirect3DVertexShader9 *pShader );
716bf215546Sopenharmony_ci
717bf215546Sopenharmony_ciHRESULT NINE_WINAPI
718bf215546Sopenharmony_ciNineDevice9_GetVertexShader( struct NineDevice9 *This,
719bf215546Sopenharmony_ci                             IDirect3DVertexShader9 **ppShader );
720bf215546Sopenharmony_ci
721bf215546Sopenharmony_ciHRESULT NINE_WINAPI
722bf215546Sopenharmony_ciNineDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
723bf215546Sopenharmony_ci                                      UINT StartRegister,
724bf215546Sopenharmony_ci                                      const float *pConstantData,
725bf215546Sopenharmony_ci                                      UINT Vector4fCount );
726bf215546Sopenharmony_ci
727bf215546Sopenharmony_ciHRESULT NINE_WINAPI
728bf215546Sopenharmony_ciNineDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
729bf215546Sopenharmony_ci                                      UINT StartRegister,
730bf215546Sopenharmony_ci                                      float *pConstantData,
731bf215546Sopenharmony_ci                                      UINT Vector4fCount );
732bf215546Sopenharmony_ci
733bf215546Sopenharmony_ciHRESULT NINE_WINAPI
734bf215546Sopenharmony_ciNineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
735bf215546Sopenharmony_ci                                      UINT StartRegister,
736bf215546Sopenharmony_ci                                      const int *pConstantData,
737bf215546Sopenharmony_ci                                      UINT Vector4iCount );
738bf215546Sopenharmony_ci
739bf215546Sopenharmony_ciHRESULT NINE_WINAPI
740bf215546Sopenharmony_ciNineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
741bf215546Sopenharmony_ci                                      UINT StartRegister,
742bf215546Sopenharmony_ci                                      int *pConstantData,
743bf215546Sopenharmony_ci                                      UINT Vector4iCount );
744bf215546Sopenharmony_ci
745bf215546Sopenharmony_ciHRESULT NINE_WINAPI
746bf215546Sopenharmony_ciNineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
747bf215546Sopenharmony_ci                                      UINT StartRegister,
748bf215546Sopenharmony_ci                                      const BOOL *pConstantData,
749bf215546Sopenharmony_ci                                      UINT BoolCount );
750bf215546Sopenharmony_ci
751bf215546Sopenharmony_ciHRESULT NINE_WINAPI
752bf215546Sopenharmony_ciNineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
753bf215546Sopenharmony_ci                                      UINT StartRegister,
754bf215546Sopenharmony_ci                                      BOOL *pConstantData,
755bf215546Sopenharmony_ci                                      UINT BoolCount );
756bf215546Sopenharmony_ci
757bf215546Sopenharmony_ciHRESULT NINE_WINAPI
758bf215546Sopenharmony_ciNineDevice9_SetStreamSource( struct NineDevice9 *This,
759bf215546Sopenharmony_ci                             UINT StreamNumber,
760bf215546Sopenharmony_ci                             IDirect3DVertexBuffer9 *pStreamData,
761bf215546Sopenharmony_ci                             UINT OffsetInBytes,
762bf215546Sopenharmony_ci                             UINT Stride );
763bf215546Sopenharmony_ci
764bf215546Sopenharmony_ciHRESULT NINE_WINAPI
765bf215546Sopenharmony_ciNineDevice9_GetStreamSource( struct NineDevice9 *This,
766bf215546Sopenharmony_ci                             UINT StreamNumber,
767bf215546Sopenharmony_ci                             IDirect3DVertexBuffer9 **ppStreamData,
768bf215546Sopenharmony_ci                             UINT *pOffsetInBytes,
769bf215546Sopenharmony_ci                             UINT *pStride );
770bf215546Sopenharmony_ci
771bf215546Sopenharmony_ciHRESULT NINE_WINAPI
772bf215546Sopenharmony_ciNineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
773bf215546Sopenharmony_ci                                 UINT StreamNumber,
774bf215546Sopenharmony_ci                                 UINT Setting );
775bf215546Sopenharmony_ci
776bf215546Sopenharmony_ciHRESULT NINE_WINAPI
777bf215546Sopenharmony_ciNineDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
778bf215546Sopenharmony_ci                                 UINT StreamNumber,
779bf215546Sopenharmony_ci                                 UINT *pSetting );
780bf215546Sopenharmony_ci
781bf215546Sopenharmony_ciHRESULT NINE_WINAPI
782bf215546Sopenharmony_ciNineDevice9_SetIndices( struct NineDevice9 *This,
783bf215546Sopenharmony_ci                        IDirect3DIndexBuffer9 *pIndexData );
784bf215546Sopenharmony_ci
785bf215546Sopenharmony_ciHRESULT NINE_WINAPI
786bf215546Sopenharmony_ciNineDevice9_GetIndices( struct NineDevice9 *This,
787bf215546Sopenharmony_ci                        IDirect3DIndexBuffer9 **ppIndexData /*,
788bf215546Sopenharmony_ci                        UINT *pBaseVertexIndex */ );
789bf215546Sopenharmony_ci
790bf215546Sopenharmony_ciHRESULT NINE_WINAPI
791bf215546Sopenharmony_ciNineDevice9_CreatePixelShader( struct NineDevice9 *This,
792bf215546Sopenharmony_ci                               const DWORD *pFunction,
793bf215546Sopenharmony_ci                               IDirect3DPixelShader9 **ppShader );
794bf215546Sopenharmony_ci
795bf215546Sopenharmony_ciHRESULT NINE_WINAPI
796bf215546Sopenharmony_ciNineDevice9_SetPixelShader( struct NineDevice9 *This,
797bf215546Sopenharmony_ci                            IDirect3DPixelShader9 *pShader );
798bf215546Sopenharmony_ci
799bf215546Sopenharmony_ciHRESULT NINE_WINAPI
800bf215546Sopenharmony_ciNineDevice9_GetPixelShader( struct NineDevice9 *This,
801bf215546Sopenharmony_ci                            IDirect3DPixelShader9 **ppShader );
802bf215546Sopenharmony_ci
803bf215546Sopenharmony_ciHRESULT NINE_WINAPI
804bf215546Sopenharmony_ciNineDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
805bf215546Sopenharmony_ci                                     UINT StartRegister,
806bf215546Sopenharmony_ci                                     const float *pConstantData,
807bf215546Sopenharmony_ci                                     UINT Vector4fCount );
808bf215546Sopenharmony_ci
809bf215546Sopenharmony_ciHRESULT NINE_WINAPI
810bf215546Sopenharmony_ciNineDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
811bf215546Sopenharmony_ci                                     UINT StartRegister,
812bf215546Sopenharmony_ci                                     float *pConstantData,
813bf215546Sopenharmony_ci                                     UINT Vector4fCount );
814bf215546Sopenharmony_ci
815bf215546Sopenharmony_ciHRESULT NINE_WINAPI
816bf215546Sopenharmony_ciNineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
817bf215546Sopenharmony_ci                                     UINT StartRegister,
818bf215546Sopenharmony_ci                                     const int *pConstantData,
819bf215546Sopenharmony_ci                                     UINT Vector4iCount );
820bf215546Sopenharmony_ci
821bf215546Sopenharmony_ciHRESULT NINE_WINAPI
822bf215546Sopenharmony_ciNineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
823bf215546Sopenharmony_ci                                     UINT StartRegister,
824bf215546Sopenharmony_ci                                     int *pConstantData,
825bf215546Sopenharmony_ci                                     UINT Vector4iCount );
826bf215546Sopenharmony_ci
827bf215546Sopenharmony_ciHRESULT NINE_WINAPI
828bf215546Sopenharmony_ciNineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
829bf215546Sopenharmony_ci                                     UINT StartRegister,
830bf215546Sopenharmony_ci                                     const BOOL *pConstantData,
831bf215546Sopenharmony_ci                                     UINT BoolCount );
832bf215546Sopenharmony_ci
833bf215546Sopenharmony_ciHRESULT NINE_WINAPI
834bf215546Sopenharmony_ciNineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
835bf215546Sopenharmony_ci                                     UINT StartRegister,
836bf215546Sopenharmony_ci                                     BOOL *pConstantData,
837bf215546Sopenharmony_ci                                     UINT BoolCount );
838bf215546Sopenharmony_ci
839bf215546Sopenharmony_ciHRESULT NINE_WINAPI
840bf215546Sopenharmony_ciNineDevice9_DrawRectPatch( struct NineDevice9 *This,
841bf215546Sopenharmony_ci                           UINT Handle,
842bf215546Sopenharmony_ci                           const float *pNumSegs,
843bf215546Sopenharmony_ci                           const D3DRECTPATCH_INFO *pRectPatchInfo );
844bf215546Sopenharmony_ci
845bf215546Sopenharmony_ciHRESULT NINE_WINAPI
846bf215546Sopenharmony_ciNineDevice9_DrawTriPatch( struct NineDevice9 *This,
847bf215546Sopenharmony_ci                          UINT Handle,
848bf215546Sopenharmony_ci                          const float *pNumSegs,
849bf215546Sopenharmony_ci                          const D3DTRIPATCH_INFO *pTriPatchInfo );
850bf215546Sopenharmony_ci
851bf215546Sopenharmony_ciHRESULT NINE_WINAPI
852bf215546Sopenharmony_ciNineDevice9_DeletePatch( struct NineDevice9 *This,
853bf215546Sopenharmony_ci                         UINT Handle );
854bf215546Sopenharmony_ci
855bf215546Sopenharmony_ciHRESULT NINE_WINAPI
856bf215546Sopenharmony_ciNineDevice9_CreateQuery( struct NineDevice9 *This,
857bf215546Sopenharmony_ci                         D3DQUERYTYPE Type,
858bf215546Sopenharmony_ci                         IDirect3DQuery9 **ppQuery );
859bf215546Sopenharmony_ci
860bf215546Sopenharmony_ci#endif /* _NINE_DEVICE9_H_ */
861