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