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