Subversion Repositories Kolibri OS

Rev

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_DEVICE9_H_
24
#define _NINE_DEVICE9_H_
25
 
26
#include "d3dadapter/d3dadapter9.h"
27
 
28
#include "iunknown.h"
29
#include "adapter9.h"
30
 
31
#include "nine_helpers.h"
32
#include "nine_state.h"
33
 
34
struct gen_mipmap_state;
35
struct util_hash_table;
36
struct pipe_screen;
37
struct pipe_context;
38
struct cso_context;
39
struct hud_context;
40
struct u_upload_mgr;
41
 
42
struct NineSwapChain9;
43
struct NineStateBlock9;
44
 
45
#include "util/list.h"
46
 
47
struct NineDevice9
48
{
49
    struct NineUnknown base;
50
    boolean ex;
51
 
52
    /* G3D context */
53
    struct pipe_screen *screen;
54
    struct pipe_context *pipe;
55
    struct cso_context *cso;
56
 
57
    /* creation parameters */
58
    D3DCAPS9 caps;
59
    D3DDEVICE_CREATION_PARAMETERS params;
60
    IDirect3D9 *d3d9;
61
 
62
    /* swapchain stuff */
63
    ID3DPresentGroup *present;
64
    struct NineSwapChain9 **swapchains;
65
    unsigned nswapchains;
66
 
67
    struct NineStateBlock9 *record;
68
    struct nine_state *update; /* state to update (&state / &record->state) */
69
    struct nine_state state;   /* device state */
70
 
71
    struct list_head update_textures;
72
 
73
    boolean is_recording;
74
    boolean in_scene;
75
 
76
    boolean prefer_user_constbuf;
77
 
78
    struct pipe_resource *constbuf_vs;
79
    struct pipe_resource *constbuf_ps;
80
    uint16_t vs_const_size;
81
    uint16_t ps_const_size;
82
    uint16_t max_vs_const_f;
83
    uint16_t max_ps_const_f;
84
 
85
    struct pipe_resource *dummy_texture;
86
    struct pipe_sampler_view *dummy_sampler;
87
 
88
    struct gen_mipmap_state *gen_mipmap;
89
 
90
    struct {
91
        struct util_hash_table *ht_vs;
92
        struct util_hash_table *ht_ps;
93
        struct NineVertexShader9 *vs;
94
        struct NinePixelShader9 *ps;
95
        unsigned num_vs;
96
        unsigned num_ps;
97
        float *vs_const;
98
        float *ps_const;
99
 
100
        struct util_hash_table *ht_fvf;
101
    } ff;
102
 
103
    struct {
104
        struct pipe_resource *image;
105
        unsigned w;
106
        unsigned h;
107
        POINT hotspot; /* -1, -1 if no cursor image set */
108
        POINT pos;
109
        BOOL visible;
110
        boolean software;
111
    } cursor;
112
 
113
    struct {
114
        boolean user_vbufs;
115
        boolean user_ibufs;
116
        boolean window_space_position_support;
117
        boolean vs_integer;
118
        boolean ps_integer;
119
    } driver_caps;
120
 
121
    struct {
122
        boolean buggy_barycentrics;
123
    } driver_bugs;
124
 
125
    struct u_upload_mgr *upload;
126
 
127
    struct nine_range_pool range_pool;
128
 
129
    struct hud_context *hud; /* NULL if hud is disabled */
130
 
131
    /* dummy vbo (containing 0 0 0 0) to bind if vertex shader input
132
     * is not bound to anything by the vertex declaration */
133
    struct pipe_resource *dummy_vbo;
134
};
135
static INLINE struct NineDevice9 *
136
NineDevice9( void *data )
137
{
138
    return (struct NineDevice9 *)data;
139
}
140
 
141
HRESULT
142
NineDevice9_new( struct pipe_screen *pScreen,
143
                 D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
144
                 D3DCAPS9 *pCaps,
145
                 D3DPRESENT_PARAMETERS *pPresentationParameters,
146
                 IDirect3D9 *pD3D9,
147
                 ID3DPresentGroup *pPresentationGroup,
148
                 struct d3dadapter9_context *pCTX,
149
                 boolean ex,
150
                 D3DDISPLAYMODEEX *pFullscreenDisplayMode,
151
                 struct NineDevice9 **ppOut );
152
 
153
HRESULT
154
NineDevice9_ctor( struct NineDevice9 *This,
155
                  struct NineUnknownParams *pParams,
156
                  struct pipe_screen *pScreen,
157
                  D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
158
                  D3DCAPS9 *pCaps,
159
                  D3DPRESENT_PARAMETERS *pPresentationParameters,
160
                  IDirect3D9 *pD3D9,
161
                  ID3DPresentGroup *pPresentationGroup,
162
                  struct d3dadapter9_context *pCTX,
163
                  boolean ex,
164
                  D3DDISPLAYMODEEX *pFullscreenDisplayMode );
165
 
166
void
167
NineDevice9_dtor( struct NineDevice9 *This );
168
 
169
/*** Nine private ***/
170
 
171
struct pipe_screen *
172
NineDevice9_GetScreen( struct NineDevice9 *This );
173
 
174
struct pipe_context *
175
NineDevice9_GetPipe( struct NineDevice9 *This );
176
 
177
struct cso_context *
178
NineDevice9_GetCSO( struct NineDevice9 *This );
179
 
180
const D3DCAPS9 *
181
NineDevice9_GetCaps( struct NineDevice9 *This );
182
 
183
/* Mask: 0x1 = constant buffers, 0x2 = stipple */
184
void
185
NineDevice9_RestoreNonCSOState( struct NineDevice9 *This, unsigned mask );
186
 
187
/*** Direct3D public ***/
188
 
189
HRESULT WINAPI
190
NineDevice9_TestCooperativeLevel( struct NineDevice9 *This );
191
 
192
UINT WINAPI
193
NineDevice9_GetAvailableTextureMem( struct NineDevice9 *This );
194
 
195
HRESULT WINAPI
196
NineDevice9_EvictManagedResources( struct NineDevice9 *This );
197
 
198
HRESULT WINAPI
199
NineDevice9_GetDirect3D( struct NineDevice9 *This,
200
                         IDirect3D9 **ppD3D9 );
201
 
202
HRESULT WINAPI
203
NineDevice9_GetDeviceCaps( struct NineDevice9 *This,
204
                           D3DCAPS9 *pCaps );
205
 
206
HRESULT WINAPI
207
NineDevice9_GetDisplayMode( struct NineDevice9 *This,
208
                            UINT iSwapChain,
209
                            D3DDISPLAYMODE *pMode );
210
 
211
HRESULT WINAPI
212
NineDevice9_GetCreationParameters( struct NineDevice9 *This,
213
                                   D3DDEVICE_CREATION_PARAMETERS *pParameters );
214
 
215
HRESULT WINAPI
216
NineDevice9_SetCursorProperties( struct NineDevice9 *This,
217
                                 UINT XHotSpot,
218
                                 UINT YHotSpot,
219
                                 IDirect3DSurface9 *pCursorBitmap );
220
 
221
void WINAPI
222
NineDevice9_SetCursorPosition( struct NineDevice9 *This,
223
                               int X,
224
                               int Y,
225
                               DWORD Flags );
226
 
227
BOOL WINAPI
228
NineDevice9_ShowCursor( struct NineDevice9 *This,
229
                        BOOL bShow );
230
 
231
HRESULT WINAPI
232
NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,
233
                                       D3DPRESENT_PARAMETERS *pPresentationParameters,
234
                                       IDirect3DSwapChain9 **pSwapChain );
235
 
236
HRESULT WINAPI
237
NineDevice9_GetSwapChain( struct NineDevice9 *This,
238
                          UINT iSwapChain,
239
                          IDirect3DSwapChain9 **pSwapChain );
240
 
241
UINT WINAPI
242
NineDevice9_GetNumberOfSwapChains( struct NineDevice9 *This );
243
 
244
HRESULT WINAPI
245
NineDevice9_Reset( struct NineDevice9 *This,
246
                   D3DPRESENT_PARAMETERS *pPresentationParameters );
247
 
248
HRESULT WINAPI
249
NineDevice9_Present( struct NineDevice9 *This,
250
                     const RECT *pSourceRect,
251
                     const RECT *pDestRect,
252
                     HWND hDestWindowOverride,
253
                     const RGNDATA *pDirtyRegion );
254
 
255
HRESULT WINAPI
256
NineDevice9_GetBackBuffer( struct NineDevice9 *This,
257
                           UINT iSwapChain,
258
                           UINT iBackBuffer,
259
                           D3DBACKBUFFER_TYPE Type,
260
                           IDirect3DSurface9 **ppBackBuffer );
261
 
262
HRESULT WINAPI
263
NineDevice9_GetRasterStatus( struct NineDevice9 *This,
264
                             UINT iSwapChain,
265
                             D3DRASTER_STATUS *pRasterStatus );
266
 
267
HRESULT WINAPI
268
NineDevice9_SetDialogBoxMode( struct NineDevice9 *This,
269
                              BOOL bEnableDialogs );
270
 
271
void WINAPI
272
NineDevice9_SetGammaRamp( struct NineDevice9 *This,
273
                          UINT iSwapChain,
274
                          DWORD Flags,
275
                          const D3DGAMMARAMP *pRamp );
276
 
277
void WINAPI
278
NineDevice9_GetGammaRamp( struct NineDevice9 *This,
279
                          UINT iSwapChain,
280
                          D3DGAMMARAMP *pRamp );
281
 
282
HRESULT WINAPI
283
NineDevice9_CreateTexture( struct NineDevice9 *This,
284
                           UINT Width,
285
                           UINT Height,
286
                           UINT Levels,
287
                           DWORD Usage,
288
                           D3DFORMAT Format,
289
                           D3DPOOL Pool,
290
                           IDirect3DTexture9 **ppTexture,
291
                           HANDLE *pSharedHandle );
292
 
293
HRESULT WINAPI
294
NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,
295
                                 UINT Width,
296
                                 UINT Height,
297
                                 UINT Depth,
298
                                 UINT Levels,
299
                                 DWORD Usage,
300
                                 D3DFORMAT Format,
301
                                 D3DPOOL Pool,
302
                                 IDirect3DVolumeTexture9 **ppVolumeTexture,
303
                                 HANDLE *pSharedHandle );
304
 
305
HRESULT WINAPI
306
NineDevice9_CreateCubeTexture( struct NineDevice9 *This,
307
                               UINT EdgeLength,
308
                               UINT Levels,
309
                               DWORD Usage,
310
                               D3DFORMAT Format,
311
                               D3DPOOL Pool,
312
                               IDirect3DCubeTexture9 **ppCubeTexture,
313
                               HANDLE *pSharedHandle );
314
 
315
HRESULT WINAPI
316
NineDevice9_CreateVertexBuffer( struct NineDevice9 *This,
317
                                UINT Length,
318
                                DWORD Usage,
319
                                DWORD FVF,
320
                                D3DPOOL Pool,
321
                                IDirect3DVertexBuffer9 **ppVertexBuffer,
322
                                HANDLE *pSharedHandle );
323
 
324
HRESULT WINAPI
325
NineDevice9_CreateIndexBuffer( struct NineDevice9 *This,
326
                               UINT Length,
327
                               DWORD Usage,
328
                               D3DFORMAT Format,
329
                               D3DPOOL Pool,
330
                               IDirect3DIndexBuffer9 **ppIndexBuffer,
331
                               HANDLE *pSharedHandle );
332
 
333
HRESULT WINAPI
334
NineDevice9_CreateRenderTarget( struct NineDevice9 *This,
335
                                UINT Width,
336
                                UINT Height,
337
                                D3DFORMAT Format,
338
                                D3DMULTISAMPLE_TYPE MultiSample,
339
                                DWORD MultisampleQuality,
340
                                BOOL Lockable,
341
                                IDirect3DSurface9 **ppSurface,
342
                                HANDLE *pSharedHandle );
343
 
344
HRESULT WINAPI
345
NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,
346
                                       UINT Width,
347
                                       UINT Height,
348
                                       D3DFORMAT Format,
349
                                       D3DMULTISAMPLE_TYPE MultiSample,
350
                                       DWORD MultisampleQuality,
351
                                       BOOL Discard,
352
                                       IDirect3DSurface9 **ppSurface,
353
                                       HANDLE *pSharedHandle );
354
 
355
HRESULT WINAPI
356
NineDevice9_UpdateSurface( struct NineDevice9 *This,
357
                           IDirect3DSurface9 *pSourceSurface,
358
                           const RECT *pSourceRect,
359
                           IDirect3DSurface9 *pDestinationSurface,
360
                           const POINT *pDestPoint );
361
 
362
HRESULT WINAPI
363
NineDevice9_UpdateTexture( struct NineDevice9 *This,
364
                           IDirect3DBaseTexture9 *pSourceTexture,
365
                           IDirect3DBaseTexture9 *pDestinationTexture );
366
 
367
HRESULT WINAPI
368
NineDevice9_GetRenderTargetData( struct NineDevice9 *This,
369
                                 IDirect3DSurface9 *pRenderTarget,
370
                                 IDirect3DSurface9 *pDestSurface );
371
 
372
HRESULT WINAPI
373
NineDevice9_GetFrontBufferData( struct NineDevice9 *This,
374
                                UINT iSwapChain,
375
                                IDirect3DSurface9 *pDestSurface );
376
 
377
HRESULT WINAPI
378
NineDevice9_StretchRect( struct NineDevice9 *This,
379
                         IDirect3DSurface9 *pSourceSurface,
380
                         const RECT *pSourceRect,
381
                         IDirect3DSurface9 *pDestSurface,
382
                         const RECT *pDestRect,
383
                         D3DTEXTUREFILTERTYPE Filter );
384
 
385
HRESULT WINAPI
386
NineDevice9_ColorFill( struct NineDevice9 *This,
387
                       IDirect3DSurface9 *pSurface,
388
                       const RECT *pRect,
389
                       D3DCOLOR color );
390
 
391
HRESULT WINAPI
392
NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,
393
                                         UINT Width,
394
                                         UINT Height,
395
                                         D3DFORMAT Format,
396
                                         D3DPOOL Pool,
397
                                         IDirect3DSurface9 **ppSurface,
398
                                         HANDLE *pSharedHandle );
399
 
400
HRESULT WINAPI
401
NineDevice9_SetRenderTarget( struct NineDevice9 *This,
402
                             DWORD RenderTargetIndex,
403
                             IDirect3DSurface9 *pRenderTarget );
404
 
405
HRESULT WINAPI
406
NineDevice9_GetRenderTarget( struct NineDevice9 *This,
407
                             DWORD RenderTargetIndex,
408
                             IDirect3DSurface9 **ppRenderTarget );
409
 
410
HRESULT WINAPI
411
NineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,
412
                                    IDirect3DSurface9 *pNewZStencil );
413
 
414
HRESULT WINAPI
415
NineDevice9_GetDepthStencilSurface( struct NineDevice9 *This,
416
                                    IDirect3DSurface9 **ppZStencilSurface );
417
 
418
HRESULT WINAPI
419
NineDevice9_BeginScene( struct NineDevice9 *This );
420
 
421
HRESULT WINAPI
422
NineDevice9_EndScene( struct NineDevice9 *This );
423
 
424
HRESULT WINAPI
425
NineDevice9_Clear( struct NineDevice9 *This,
426
                   DWORD Count,
427
                   const D3DRECT *pRects,
428
                   DWORD Flags,
429
                   D3DCOLOR Color,
430
                   float Z,
431
                   DWORD Stencil );
432
 
433
HRESULT WINAPI
434
NineDevice9_SetTransform( struct NineDevice9 *This,
435
                          D3DTRANSFORMSTATETYPE State,
436
                          const D3DMATRIX *pMatrix );
437
 
438
HRESULT WINAPI
439
NineDevice9_GetTransform( struct NineDevice9 *This,
440
                          D3DTRANSFORMSTATETYPE State,
441
                          D3DMATRIX *pMatrix );
442
 
443
HRESULT WINAPI
444
NineDevice9_MultiplyTransform( struct NineDevice9 *This,
445
                               D3DTRANSFORMSTATETYPE State,
446
                               const D3DMATRIX *pMatrix );
447
 
448
HRESULT WINAPI
449
NineDevice9_SetViewport( struct NineDevice9 *This,
450
                         const D3DVIEWPORT9 *pViewport );
451
 
452
HRESULT WINAPI
453
NineDevice9_GetViewport( struct NineDevice9 *This,
454
                         D3DVIEWPORT9 *pViewport );
455
 
456
HRESULT WINAPI
457
NineDevice9_SetMaterial( struct NineDevice9 *This,
458
                         const D3DMATERIAL9 *pMaterial );
459
 
460
HRESULT WINAPI
461
NineDevice9_GetMaterial( struct NineDevice9 *This,
462
                         D3DMATERIAL9 *pMaterial );
463
 
464
HRESULT WINAPI
465
NineDevice9_SetLight( struct NineDevice9 *This,
466
                      DWORD Index,
467
                      const D3DLIGHT9 *pLight );
468
 
469
HRESULT WINAPI
470
NineDevice9_GetLight( struct NineDevice9 *This,
471
                      DWORD Index,
472
                      D3DLIGHT9 *pLight );
473
 
474
HRESULT WINAPI
475
NineDevice9_LightEnable( struct NineDevice9 *This,
476
                         DWORD Index,
477
                         BOOL Enable );
478
 
479
HRESULT WINAPI
480
NineDevice9_GetLightEnable( struct NineDevice9 *This,
481
                            DWORD Index,
482
                            BOOL *pEnable );
483
 
484
HRESULT WINAPI
485
NineDevice9_SetClipPlane( struct NineDevice9 *This,
486
                          DWORD Index,
487
                          const float *pPlane );
488
 
489
HRESULT WINAPI
490
NineDevice9_GetClipPlane( struct NineDevice9 *This,
491
                          DWORD Index,
492
                          float *pPlane );
493
 
494
HRESULT WINAPI
495
NineDevice9_SetRenderState( struct NineDevice9 *This,
496
                            D3DRENDERSTATETYPE State,
497
                            DWORD Value );
498
 
499
HRESULT WINAPI
500
NineDevice9_GetRenderState( struct NineDevice9 *This,
501
                            D3DRENDERSTATETYPE State,
502
                            DWORD *pValue );
503
 
504
HRESULT WINAPI
505
NineDevice9_CreateStateBlock( struct NineDevice9 *This,
506
                              D3DSTATEBLOCKTYPE Type,
507
                              IDirect3DStateBlock9 **ppSB );
508
 
509
HRESULT WINAPI
510
NineDevice9_BeginStateBlock( struct NineDevice9 *This );
511
 
512
HRESULT WINAPI
513
NineDevice9_EndStateBlock( struct NineDevice9 *This,
514
                           IDirect3DStateBlock9 **ppSB );
515
 
516
HRESULT WINAPI
517
NineDevice9_SetClipStatus( struct NineDevice9 *This,
518
                           const D3DCLIPSTATUS9 *pClipStatus );
519
 
520
HRESULT WINAPI
521
NineDevice9_GetClipStatus( struct NineDevice9 *This,
522
                           D3DCLIPSTATUS9 *pClipStatus );
523
 
524
HRESULT WINAPI
525
NineDevice9_GetTexture( struct NineDevice9 *This,
526
                        DWORD Stage,
527
                        IDirect3DBaseTexture9 **ppTexture );
528
 
529
HRESULT WINAPI
530
NineDevice9_SetTexture( struct NineDevice9 *This,
531
                        DWORD Stage,
532
                        IDirect3DBaseTexture9 *pTexture );
533
 
534
HRESULT WINAPI
535
NineDevice9_GetTextureStageState( struct NineDevice9 *This,
536
                                  DWORD Stage,
537
                                  D3DTEXTURESTAGESTATETYPE Type,
538
                                  DWORD *pValue );
539
 
540
HRESULT WINAPI
541
NineDevice9_SetTextureStageState( struct NineDevice9 *This,
542
                                  DWORD Stage,
543
                                  D3DTEXTURESTAGESTATETYPE Type,
544
                                  DWORD Value );
545
 
546
HRESULT WINAPI
547
NineDevice9_GetSamplerState( struct NineDevice9 *This,
548
                             DWORD Sampler,
549
                             D3DSAMPLERSTATETYPE Type,
550
                             DWORD *pValue );
551
 
552
HRESULT WINAPI
553
NineDevice9_SetSamplerState( struct NineDevice9 *This,
554
                             DWORD Sampler,
555
                             D3DSAMPLERSTATETYPE Type,
556
                             DWORD Value );
557
 
558
HRESULT WINAPI
559
NineDevice9_ValidateDevice( struct NineDevice9 *This,
560
                            DWORD *pNumPasses );
561
 
562
HRESULT WINAPI
563
NineDevice9_SetPaletteEntries( struct NineDevice9 *This,
564
                               UINT PaletteNumber,
565
                               const PALETTEENTRY *pEntries );
566
 
567
HRESULT WINAPI
568
NineDevice9_GetPaletteEntries( struct NineDevice9 *This,
569
                               UINT PaletteNumber,
570
                               PALETTEENTRY *pEntries );
571
 
572
HRESULT WINAPI
573
NineDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,
574
                                      UINT PaletteNumber );
575
 
576
HRESULT WINAPI
577
NineDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,
578
                                      UINT *PaletteNumber );
579
 
580
HRESULT WINAPI
581
NineDevice9_SetScissorRect( struct NineDevice9 *This,
582
                            const RECT *pRect );
583
 
584
HRESULT WINAPI
585
NineDevice9_GetScissorRect( struct NineDevice9 *This,
586
                            RECT *pRect );
587
 
588
HRESULT WINAPI
589
NineDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,
590
                                         BOOL bSoftware );
591
 
592
BOOL WINAPI
593
NineDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This );
594
 
595
HRESULT WINAPI
596
NineDevice9_SetNPatchMode( struct NineDevice9 *This,
597
                           float nSegments );
598
 
599
float WINAPI
600
NineDevice9_GetNPatchMode( struct NineDevice9 *This );
601
 
602
HRESULT WINAPI
603
NineDevice9_DrawPrimitive( struct NineDevice9 *This,
604
                           D3DPRIMITIVETYPE PrimitiveType,
605
                           UINT StartVertex,
606
                           UINT PrimitiveCount );
607
 
608
HRESULT WINAPI
609
NineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,
610
                                  D3DPRIMITIVETYPE PrimitiveType,
611
                                  INT BaseVertexIndex,
612
                                  UINT MinVertexIndex,
613
                                  UINT NumVertices,
614
                                  UINT startIndex,
615
                                  UINT primCount );
616
 
617
HRESULT WINAPI
618
NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,
619
                             D3DPRIMITIVETYPE PrimitiveType,
620
                             UINT PrimitiveCount,
621
                             const void *pVertexStreamZeroData,
622
                             UINT VertexStreamZeroStride );
623
 
624
HRESULT WINAPI
625
NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,
626
                                    D3DPRIMITIVETYPE PrimitiveType,
627
                                    UINT MinVertexIndex,
628
                                    UINT NumVertices,
629
                                    UINT PrimitiveCount,
630
                                    const void *pIndexData,
631
                                    D3DFORMAT IndexDataFormat,
632
                                    const void *pVertexStreamZeroData,
633
                                    UINT VertexStreamZeroStride );
634
 
635
HRESULT WINAPI
636
NineDevice9_ProcessVertices( struct NineDevice9 *This,
637
                             UINT SrcStartIndex,
638
                             UINT DestIndex,
639
                             UINT VertexCount,
640
                             IDirect3DVertexBuffer9 *pDestBuffer,
641
                             IDirect3DVertexDeclaration9 *pVertexDecl,
642
                             DWORD Flags );
643
 
644
HRESULT WINAPI
645
NineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,
646
                                     const D3DVERTEXELEMENT9 *pVertexElements,
647
                                     IDirect3DVertexDeclaration9 **ppDecl );
648
 
649
HRESULT WINAPI
650
NineDevice9_SetVertexDeclaration( struct NineDevice9 *This,
651
                                  IDirect3DVertexDeclaration9 *pDecl );
652
 
653
HRESULT WINAPI
654
NineDevice9_GetVertexDeclaration( struct NineDevice9 *This,
655
                                  IDirect3DVertexDeclaration9 **ppDecl );
656
 
657
HRESULT WINAPI
658
NineDevice9_SetFVF( struct NineDevice9 *This,
659
                    DWORD FVF );
660
 
661
HRESULT WINAPI
662
NineDevice9_GetFVF( struct NineDevice9 *This,
663
                    DWORD *pFVF );
664
 
665
HRESULT WINAPI
666
NineDevice9_CreateVertexShader( struct NineDevice9 *This,
667
                                const DWORD *pFunction,
668
                                IDirect3DVertexShader9 **ppShader );
669
 
670
HRESULT WINAPI
671
NineDevice9_SetVertexShader( struct NineDevice9 *This,
672
                             IDirect3DVertexShader9 *pShader );
673
 
674
HRESULT WINAPI
675
NineDevice9_GetVertexShader( struct NineDevice9 *This,
676
                             IDirect3DVertexShader9 **ppShader );
677
 
678
HRESULT WINAPI
679
NineDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,
680
                                      UINT StartRegister,
681
                                      const float *pConstantData,
682
                                      UINT Vector4fCount );
683
 
684
HRESULT WINAPI
685
NineDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,
686
                                      UINT StartRegister,
687
                                      float *pConstantData,
688
                                      UINT Vector4fCount );
689
 
690
HRESULT WINAPI
691
NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,
692
                                      UINT StartRegister,
693
                                      const int *pConstantData,
694
                                      UINT Vector4iCount );
695
 
696
HRESULT WINAPI
697
NineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,
698
                                      UINT StartRegister,
699
                                      int *pConstantData,
700
                                      UINT Vector4iCount );
701
 
702
HRESULT WINAPI
703
NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,
704
                                      UINT StartRegister,
705
                                      const BOOL *pConstantData,
706
                                      UINT BoolCount );
707
 
708
HRESULT WINAPI
709
NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,
710
                                      UINT StartRegister,
711
                                      BOOL *pConstantData,
712
                                      UINT BoolCount );
713
 
714
HRESULT WINAPI
715
NineDevice9_SetStreamSource( struct NineDevice9 *This,
716
                             UINT StreamNumber,
717
                             IDirect3DVertexBuffer9 *pStreamData,
718
                             UINT OffsetInBytes,
719
                             UINT Stride );
720
 
721
HRESULT WINAPI
722
NineDevice9_GetStreamSource( struct NineDevice9 *This,
723
                             UINT StreamNumber,
724
                             IDirect3DVertexBuffer9 **ppStreamData,
725
                             UINT *pOffsetInBytes,
726
                             UINT *pStride );
727
 
728
HRESULT WINAPI
729
NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,
730
                                 UINT StreamNumber,
731
                                 UINT Setting );
732
 
733
HRESULT WINAPI
734
NineDevice9_GetStreamSourceFreq( struct NineDevice9 *This,
735
                                 UINT StreamNumber,
736
                                 UINT *pSetting );
737
 
738
HRESULT WINAPI
739
NineDevice9_SetIndices( struct NineDevice9 *This,
740
                        IDirect3DIndexBuffer9 *pIndexData );
741
 
742
HRESULT WINAPI
743
NineDevice9_GetIndices( struct NineDevice9 *This,
744
                        IDirect3DIndexBuffer9 **ppIndexData /*,
745
                        UINT *pBaseVertexIndex */ );
746
 
747
HRESULT WINAPI
748
NineDevice9_CreatePixelShader( struct NineDevice9 *This,
749
                               const DWORD *pFunction,
750
                               IDirect3DPixelShader9 **ppShader );
751
 
752
HRESULT WINAPI
753
NineDevice9_SetPixelShader( struct NineDevice9 *This,
754
                            IDirect3DPixelShader9 *pShader );
755
 
756
HRESULT WINAPI
757
NineDevice9_GetPixelShader( struct NineDevice9 *This,
758
                            IDirect3DPixelShader9 **ppShader );
759
 
760
HRESULT WINAPI
761
NineDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,
762
                                     UINT StartRegister,
763
                                     const float *pConstantData,
764
                                     UINT Vector4fCount );
765
 
766
HRESULT WINAPI
767
NineDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,
768
                                     UINT StartRegister,
769
                                     float *pConstantData,
770
                                     UINT Vector4fCount );
771
 
772
HRESULT WINAPI
773
NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,
774
                                     UINT StartRegister,
775
                                     const int *pConstantData,
776
                                     UINT Vector4iCount );
777
 
778
HRESULT WINAPI
779
NineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,
780
                                     UINT StartRegister,
781
                                     int *pConstantData,
782
                                     UINT Vector4iCount );
783
 
784
HRESULT WINAPI
785
NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,
786
                                     UINT StartRegister,
787
                                     const BOOL *pConstantData,
788
                                     UINT BoolCount );
789
 
790
HRESULT WINAPI
791
NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,
792
                                     UINT StartRegister,
793
                                     BOOL *pConstantData,
794
                                     UINT BoolCount );
795
 
796
HRESULT WINAPI
797
NineDevice9_DrawRectPatch( struct NineDevice9 *This,
798
                           UINT Handle,
799
                           const float *pNumSegs,
800
                           const D3DRECTPATCH_INFO *pRectPatchInfo );
801
 
802
HRESULT WINAPI
803
NineDevice9_DrawTriPatch( struct NineDevice9 *This,
804
                          UINT Handle,
805
                          const float *pNumSegs,
806
                          const D3DTRIPATCH_INFO *pTriPatchInfo );
807
 
808
HRESULT WINAPI
809
NineDevice9_DeletePatch( struct NineDevice9 *This,
810
                         UINT Handle );
811
 
812
HRESULT WINAPI
813
NineDevice9_CreateQuery( struct NineDevice9 *This,
814
                         D3DQUERYTYPE Type,
815
                         IDirect3DQuery9 **ppQuery );
816
 
817
#endif /* _NINE_DEVICE9_H_ */