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