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