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