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