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