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