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