Path: blob/21.2-virgl/src/gallium/frontends/nine/device9.h
4561 views
/*1* Copyright 2011 Joakim Sindholt <[email protected]>2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* on the rights to use, copy, modify, merge, publish, distribute, sub7* license, and/or sell copies of the Software, and to permit persons to whom8* the Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL17* THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,18* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR19* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE20* USE OR OTHER DEALINGS IN THE SOFTWARE. */2122#ifndef _NINE_DEVICE9_H_23#define _NINE_DEVICE9_H_2425#include "d3dadapter/d3dadapter9.h"2627#include "iunknown.h"28#include "adapter9.h"2930#include "nine_helpers.h"31#include "nine_memory_helper.h"32#include "nine_state.h"3334struct gen_mipmap_state;35struct hash_table;36struct pipe_screen;37struct pipe_context;38struct cso_context;39struct hud_context;40struct u_upload_mgr;41struct csmt_context;4243struct NineSwapChain9;44struct NineStateBlock9;4546#include "util/list.h"4748struct NineDevice949{50struct NineUnknown base;51boolean ex;52boolean may_swvp;5354/* G3D context */55struct pipe_screen *screen;56/* For first time upload. No Sync with rendering thread */57struct pipe_context *pipe_secondary;58struct pipe_screen *screen_sw;59struct pipe_context *pipe_sw;60struct cso_context *cso_sw;6162/* CSMT context */63struct csmt_context *csmt_ctx;64BOOL csmt_active;6566/* For DISCARD/NOOVERWRITE */67struct nine_buffer_upload *buffer_upload;6869/* creation parameters */70D3DCAPS9 caps;71D3DDEVICE_CREATION_PARAMETERS params;72IDirect3D9 *d3d9;7374/* swapchain stuff */75ID3DPresentGroup *present;76struct NineSwapChain9 **swapchains;77unsigned nswapchains;7879struct NineStateBlock9 *record;80struct nine_state *update; /* state to update (&state / &record->state) */81struct nine_state state; /* device state */82struct nine_context context;83struct nine_state_sw_internal state_sw_internal;8485struct list_head update_buffers;86struct list_head update_textures;87struct list_head managed_buffers;88struct list_head managed_textures;8990boolean is_recording;91boolean in_scene;92unsigned end_scene_since_present;9394uint16_t vs_const_size;95uint16_t ps_const_size;96uint16_t max_vs_const_f;97uint16_t max_ps_const_f;9899struct pipe_resource *dummy_texture;100struct pipe_sampler_view *dummy_sampler_view;101struct pipe_sampler_state dummy_sampler_state;102103struct gen_mipmap_state *gen_mipmap;104105struct {106struct hash_table *ht_vs;107struct hash_table *ht_ps;108struct NineVertexShader9 *vs;109struct NinePixelShader9 *ps;110unsigned num_vs;111unsigned num_ps;112float *vs_const;113float *ps_const;114115struct hash_table *ht_fvf;116} ff;117118struct {119struct pipe_resource *image;120unsigned w;121unsigned h;122POINT hotspot; /* -1, -1 if no cursor image set */123POINT pos;124BOOL visible;125boolean software;126void *hw_upload_temp;127} cursor;128129struct {130boolean user_sw_vbufs;131boolean window_space_position_support;132boolean vs_integer;133boolean ps_integer;134boolean offset_units_unscaled;135} driver_caps;136137struct {138boolean buggy_barycentrics;139} driver_bugs;140141struct {142boolean dynamic_texture_workaround;143} workarounds;144145struct u_upload_mgr *vertex_uploader;146147struct nine_range_pool range_pool;148149struct hud_context *hud; /* NULL if hud is disabled */150151struct nine_allocator *allocator;152153/* dummy vbo (containing 0 0 0 0) to bind if vertex shader input154* is not bound to anything by the vertex declaration */155struct pipe_resource *dummy_vbo;156BOOL device_needs_reset;157int minor_version_num;158long long available_texture_mem;159long long available_texture_limit;160161/* software vertex processing */162boolean swvp;163/* pure device */164boolean pure;165166unsigned frame_count; /* It's ok if we overflow */167168/* Ex */169int gpu_priority;170unsigned max_frame_latency;171};172static inline struct NineDevice9 *173NineDevice9( void *data )174{175return (struct NineDevice9 *)data;176}177178HRESULT179NineDevice9_new( struct pipe_screen *pScreen,180D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,181D3DCAPS9 *pCaps,182D3DPRESENT_PARAMETERS *pPresentationParameters,183IDirect3D9 *pD3D9,184ID3DPresentGroup *pPresentationGroup,185struct d3dadapter9_context *pCTX,186boolean ex,187D3DDISPLAYMODEEX *pFullscreenDisplayMode,188struct NineDevice9 **ppOut,189int minorVersionNum );190191HRESULT192NineDevice9_ctor( struct NineDevice9 *This,193struct NineUnknownParams *pParams,194struct pipe_screen *pScreen,195D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,196D3DCAPS9 *pCaps,197D3DPRESENT_PARAMETERS *pPresentationParameters,198IDirect3D9 *pD3D9,199ID3DPresentGroup *pPresentationGroup,200struct d3dadapter9_context *pCTX,201boolean ex,202D3DDISPLAYMODEEX *pFullscreenDisplayMode,203int minorVersionNum );204205void206NineDevice9_dtor( struct NineDevice9 *This );207208/*** Nine private ***/209struct pipe_resource *210nine_resource_create_with_retry( struct NineDevice9 *This,211struct pipe_screen *screen,212const struct pipe_resource *templat );213214void215NineDevice9_SetDefaultState( struct NineDevice9 *This, boolean is_reset );216217struct pipe_screen *218NineDevice9_GetScreen( struct NineDevice9 *This );219220struct pipe_context *221NineDevice9_GetPipe( struct NineDevice9 *This );222223const D3DCAPS9 *224NineDevice9_GetCaps( struct NineDevice9 *This );225226void227NineDevice9_EvictManagedResourcesInternal( struct NineDevice9 *This );228229/*** Direct3D public ***/230231HRESULT NINE_WINAPI232NineDevice9_TestCooperativeLevel( struct NineDevice9 *This );233234UINT NINE_WINAPI235NineDevice9_GetAvailableTextureMem( struct NineDevice9 *This );236237HRESULT NINE_WINAPI238NineDevice9_EvictManagedResources( struct NineDevice9 *This );239240HRESULT NINE_WINAPI241NineDevice9_GetDirect3D( struct NineDevice9 *This,242IDirect3D9 **ppD3D9 );243244HRESULT NINE_WINAPI245NineDevice9_GetDeviceCaps( struct NineDevice9 *This,246D3DCAPS9 *pCaps );247248HRESULT NINE_WINAPI249NineDevice9_GetDisplayMode( struct NineDevice9 *This,250UINT iSwapChain,251D3DDISPLAYMODE *pMode );252253HRESULT NINE_WINAPI254NineDevice9_GetCreationParameters( struct NineDevice9 *This,255D3DDEVICE_CREATION_PARAMETERS *pParameters );256257HRESULT NINE_WINAPI258NineDevice9_SetCursorProperties( struct NineDevice9 *This,259UINT XHotSpot,260UINT YHotSpot,261IDirect3DSurface9 *pCursorBitmap );262263void NINE_WINAPI264NineDevice9_SetCursorPosition( struct NineDevice9 *This,265int X,266int Y,267DWORD Flags );268269BOOL NINE_WINAPI270NineDevice9_ShowCursor( struct NineDevice9 *This,271BOOL bShow );272273HRESULT NINE_WINAPI274NineDevice9_CreateAdditionalSwapChain( struct NineDevice9 *This,275D3DPRESENT_PARAMETERS *pPresentationParameters,276IDirect3DSwapChain9 **pSwapChain );277278HRESULT NINE_WINAPI279NineDevice9_GetSwapChain( struct NineDevice9 *This,280UINT iSwapChain,281IDirect3DSwapChain9 **pSwapChain );282283UINT NINE_WINAPI284NineDevice9_GetNumberOfSwapChains( struct NineDevice9 *This );285286HRESULT NINE_WINAPI287NineDevice9_Reset( struct NineDevice9 *This,288D3DPRESENT_PARAMETERS *pPresentationParameters );289290HRESULT NINE_WINAPI291NineDevice9_Present( struct NineDevice9 *This,292const RECT *pSourceRect,293const RECT *pDestRect,294HWND hDestWindowOverride,295const RGNDATA *pDirtyRegion );296297HRESULT NINE_WINAPI298NineDevice9_GetBackBuffer( struct NineDevice9 *This,299UINT iSwapChain,300UINT iBackBuffer,301D3DBACKBUFFER_TYPE Type,302IDirect3DSurface9 **ppBackBuffer );303304HRESULT NINE_WINAPI305NineDevice9_GetRasterStatus( struct NineDevice9 *This,306UINT iSwapChain,307D3DRASTER_STATUS *pRasterStatus );308309HRESULT NINE_WINAPI310NineDevice9_SetDialogBoxMode( struct NineDevice9 *This,311BOOL bEnableDialogs );312313void NINE_WINAPI314NineDevice9_SetGammaRamp( struct NineDevice9 *This,315UINT iSwapChain,316DWORD Flags,317const D3DGAMMARAMP *pRamp );318319void NINE_WINAPI320NineDevice9_GetGammaRamp( struct NineDevice9 *This,321UINT iSwapChain,322D3DGAMMARAMP *pRamp );323324HRESULT NINE_WINAPI325NineDevice9_CreateTexture( struct NineDevice9 *This,326UINT Width,327UINT Height,328UINT Levels,329DWORD Usage,330D3DFORMAT Format,331D3DPOOL Pool,332IDirect3DTexture9 **ppTexture,333HANDLE *pSharedHandle );334335HRESULT NINE_WINAPI336NineDevice9_CreateVolumeTexture( struct NineDevice9 *This,337UINT Width,338UINT Height,339UINT Depth,340UINT Levels,341DWORD Usage,342D3DFORMAT Format,343D3DPOOL Pool,344IDirect3DVolumeTexture9 **ppVolumeTexture,345HANDLE *pSharedHandle );346347HRESULT NINE_WINAPI348NineDevice9_CreateCubeTexture( struct NineDevice9 *This,349UINT EdgeLength,350UINT Levels,351DWORD Usage,352D3DFORMAT Format,353D3DPOOL Pool,354IDirect3DCubeTexture9 **ppCubeTexture,355HANDLE *pSharedHandle );356357HRESULT NINE_WINAPI358NineDevice9_CreateVertexBuffer( struct NineDevice9 *This,359UINT Length,360DWORD Usage,361DWORD FVF,362D3DPOOL Pool,363IDirect3DVertexBuffer9 **ppVertexBuffer,364HANDLE *pSharedHandle );365366HRESULT NINE_WINAPI367NineDevice9_CreateIndexBuffer( struct NineDevice9 *This,368UINT Length,369DWORD Usage,370D3DFORMAT Format,371D3DPOOL Pool,372IDirect3DIndexBuffer9 **ppIndexBuffer,373HANDLE *pSharedHandle );374375HRESULT NINE_WINAPI376NineDevice9_CreateRenderTarget( struct NineDevice9 *This,377UINT Width,378UINT Height,379D3DFORMAT Format,380D3DMULTISAMPLE_TYPE MultiSample,381DWORD MultisampleQuality,382BOOL Lockable,383IDirect3DSurface9 **ppSurface,384HANDLE *pSharedHandle );385386HRESULT NINE_WINAPI387NineDevice9_CreateDepthStencilSurface( struct NineDevice9 *This,388UINT Width,389UINT Height,390D3DFORMAT Format,391D3DMULTISAMPLE_TYPE MultiSample,392DWORD MultisampleQuality,393BOOL Discard,394IDirect3DSurface9 **ppSurface,395HANDLE *pSharedHandle );396397HRESULT NINE_WINAPI398NineDevice9_UpdateSurface( struct NineDevice9 *This,399IDirect3DSurface9 *pSourceSurface,400const RECT *pSourceRect,401IDirect3DSurface9 *pDestinationSurface,402const POINT *pDestPoint );403404HRESULT NINE_WINAPI405NineDevice9_UpdateTexture( struct NineDevice9 *This,406IDirect3DBaseTexture9 *pSourceTexture,407IDirect3DBaseTexture9 *pDestinationTexture );408409HRESULT NINE_WINAPI410NineDevice9_GetRenderTargetData( struct NineDevice9 *This,411IDirect3DSurface9 *pRenderTarget,412IDirect3DSurface9 *pDestSurface );413414HRESULT NINE_WINAPI415NineDevice9_GetFrontBufferData( struct NineDevice9 *This,416UINT iSwapChain,417IDirect3DSurface9 *pDestSurface );418419HRESULT NINE_WINAPI420NineDevice9_StretchRect( struct NineDevice9 *This,421IDirect3DSurface9 *pSourceSurface,422const RECT *pSourceRect,423IDirect3DSurface9 *pDestSurface,424const RECT *pDestRect,425D3DTEXTUREFILTERTYPE Filter );426427HRESULT NINE_WINAPI428NineDevice9_ColorFill( struct NineDevice9 *This,429IDirect3DSurface9 *pSurface,430const RECT *pRect,431D3DCOLOR color );432433HRESULT NINE_WINAPI434NineDevice9_CreateOffscreenPlainSurface( struct NineDevice9 *This,435UINT Width,436UINT Height,437D3DFORMAT Format,438D3DPOOL Pool,439IDirect3DSurface9 **ppSurface,440HANDLE *pSharedHandle );441442HRESULT NINE_WINAPI443NineDevice9_SetRenderTarget( struct NineDevice9 *This,444DWORD RenderTargetIndex,445IDirect3DSurface9 *pRenderTarget );446447HRESULT NINE_WINAPI448NineDevice9_GetRenderTarget( struct NineDevice9 *This,449DWORD RenderTargetIndex,450IDirect3DSurface9 **ppRenderTarget );451452HRESULT NINE_WINAPI453NineDevice9_SetDepthStencilSurface( struct NineDevice9 *This,454IDirect3DSurface9 *pNewZStencil );455456HRESULT NINE_WINAPI457NineDevice9_GetDepthStencilSurface( struct NineDevice9 *This,458IDirect3DSurface9 **ppZStencilSurface );459460HRESULT NINE_WINAPI461NineDevice9_BeginScene( struct NineDevice9 *This );462463HRESULT NINE_WINAPI464NineDevice9_EndScene( struct NineDevice9 *This );465466HRESULT NINE_WINAPI467NineDevice9_Clear( struct NineDevice9 *This,468DWORD Count,469const D3DRECT *pRects,470DWORD Flags,471D3DCOLOR Color,472float Z,473DWORD Stencil );474475HRESULT NINE_WINAPI476NineDevice9_SetTransform( struct NineDevice9 *This,477D3DTRANSFORMSTATETYPE State,478const D3DMATRIX *pMatrix );479480HRESULT NINE_WINAPI481NineDevice9_GetTransform( struct NineDevice9 *This,482D3DTRANSFORMSTATETYPE State,483D3DMATRIX *pMatrix );484485HRESULT NINE_WINAPI486NineDevice9_MultiplyTransform( struct NineDevice9 *This,487D3DTRANSFORMSTATETYPE State,488const D3DMATRIX *pMatrix );489490HRESULT NINE_WINAPI491NineDevice9_SetViewport( struct NineDevice9 *This,492const D3DVIEWPORT9 *pViewport );493494HRESULT NINE_WINAPI495NineDevice9_GetViewport( struct NineDevice9 *This,496D3DVIEWPORT9 *pViewport );497498HRESULT NINE_WINAPI499NineDevice9_SetMaterial( struct NineDevice9 *This,500const D3DMATERIAL9 *pMaterial );501502HRESULT NINE_WINAPI503NineDevice9_GetMaterial( struct NineDevice9 *This,504D3DMATERIAL9 *pMaterial );505506HRESULT NINE_WINAPI507NineDevice9_SetLight( struct NineDevice9 *This,508DWORD Index,509const D3DLIGHT9 *pLight );510511HRESULT NINE_WINAPI512NineDevice9_GetLight( struct NineDevice9 *This,513DWORD Index,514D3DLIGHT9 *pLight );515516HRESULT NINE_WINAPI517NineDevice9_LightEnable( struct NineDevice9 *This,518DWORD Index,519BOOL Enable );520521HRESULT NINE_WINAPI522NineDevice9_GetLightEnable( struct NineDevice9 *This,523DWORD Index,524BOOL *pEnable );525526HRESULT NINE_WINAPI527NineDevice9_SetClipPlane( struct NineDevice9 *This,528DWORD Index,529const float *pPlane );530531HRESULT NINE_WINAPI532NineDevice9_GetClipPlane( struct NineDevice9 *This,533DWORD Index,534float *pPlane );535536HRESULT NINE_WINAPI537NineDevice9_SetRenderState( struct NineDevice9 *This,538D3DRENDERSTATETYPE State,539DWORD Value );540541HRESULT NINE_WINAPI542NineDevice9_GetRenderState( struct NineDevice9 *This,543D3DRENDERSTATETYPE State,544DWORD *pValue );545546HRESULT NINE_WINAPI547NineDevice9_CreateStateBlock( struct NineDevice9 *This,548D3DSTATEBLOCKTYPE Type,549IDirect3DStateBlock9 **ppSB );550551HRESULT NINE_WINAPI552NineDevice9_BeginStateBlock( struct NineDevice9 *This );553554HRESULT NINE_WINAPI555NineDevice9_EndStateBlock( struct NineDevice9 *This,556IDirect3DStateBlock9 **ppSB );557558HRESULT NINE_WINAPI559NineDevice9_SetClipStatus( struct NineDevice9 *This,560const D3DCLIPSTATUS9 *pClipStatus );561562HRESULT NINE_WINAPI563NineDevice9_GetClipStatus( struct NineDevice9 *This,564D3DCLIPSTATUS9 *pClipStatus );565566HRESULT NINE_WINAPI567NineDevice9_GetTexture( struct NineDevice9 *This,568DWORD Stage,569IDirect3DBaseTexture9 **ppTexture );570571HRESULT NINE_WINAPI572NineDevice9_SetTexture( struct NineDevice9 *This,573DWORD Stage,574IDirect3DBaseTexture9 *pTexture );575576HRESULT NINE_WINAPI577NineDevice9_GetTextureStageState( struct NineDevice9 *This,578DWORD Stage,579D3DTEXTURESTAGESTATETYPE Type,580DWORD *pValue );581582HRESULT NINE_WINAPI583NineDevice9_SetTextureStageState( struct NineDevice9 *This,584DWORD Stage,585D3DTEXTURESTAGESTATETYPE Type,586DWORD Value );587588HRESULT NINE_WINAPI589NineDevice9_GetSamplerState( struct NineDevice9 *This,590DWORD Sampler,591D3DSAMPLERSTATETYPE Type,592DWORD *pValue );593594HRESULT NINE_WINAPI595NineDevice9_SetSamplerState( struct NineDevice9 *This,596DWORD Sampler,597D3DSAMPLERSTATETYPE Type,598DWORD Value );599600HRESULT NINE_WINAPI601NineDevice9_ValidateDevice( struct NineDevice9 *This,602DWORD *pNumPasses );603604HRESULT NINE_WINAPI605NineDevice9_SetPaletteEntries( struct NineDevice9 *This,606UINT PaletteNumber,607const PALETTEENTRY *pEntries );608609HRESULT NINE_WINAPI610NineDevice9_GetPaletteEntries( struct NineDevice9 *This,611UINT PaletteNumber,612PALETTEENTRY *pEntries );613614HRESULT NINE_WINAPI615NineDevice9_SetCurrentTexturePalette( struct NineDevice9 *This,616UINT PaletteNumber );617618HRESULT NINE_WINAPI619NineDevice9_GetCurrentTexturePalette( struct NineDevice9 *This,620UINT *PaletteNumber );621622HRESULT NINE_WINAPI623NineDevice9_SetScissorRect( struct NineDevice9 *This,624const RECT *pRect );625626HRESULT NINE_WINAPI627NineDevice9_GetScissorRect( struct NineDevice9 *This,628RECT *pRect );629630HRESULT NINE_WINAPI631NineDevice9_SetSoftwareVertexProcessing( struct NineDevice9 *This,632BOOL bSoftware );633634BOOL NINE_WINAPI635NineDevice9_GetSoftwareVertexProcessing( struct NineDevice9 *This );636637HRESULT NINE_WINAPI638NineDevice9_SetNPatchMode( struct NineDevice9 *This,639float nSegments );640641float NINE_WINAPI642NineDevice9_GetNPatchMode( struct NineDevice9 *This );643644HRESULT NINE_WINAPI645NineDevice9_DrawPrimitive( struct NineDevice9 *This,646D3DPRIMITIVETYPE PrimitiveType,647UINT StartVertex,648UINT PrimitiveCount );649650HRESULT NINE_WINAPI651NineDevice9_DrawIndexedPrimitive( struct NineDevice9 *This,652D3DPRIMITIVETYPE PrimitiveType,653INT BaseVertexIndex,654UINT MinVertexIndex,655UINT NumVertices,656UINT startIndex,657UINT primCount );658659HRESULT NINE_WINAPI660NineDevice9_DrawPrimitiveUP( struct NineDevice9 *This,661D3DPRIMITIVETYPE PrimitiveType,662UINT PrimitiveCount,663const void *pVertexStreamZeroData,664UINT VertexStreamZeroStride );665666HRESULT NINE_WINAPI667NineDevice9_DrawIndexedPrimitiveUP( struct NineDevice9 *This,668D3DPRIMITIVETYPE PrimitiveType,669UINT MinVertexIndex,670UINT NumVertices,671UINT PrimitiveCount,672const void *pIndexData,673D3DFORMAT IndexDataFormat,674const void *pVertexStreamZeroData,675UINT VertexStreamZeroStride );676677HRESULT NINE_WINAPI678NineDevice9_ProcessVertices( struct NineDevice9 *This,679UINT SrcStartIndex,680UINT DestIndex,681UINT VertexCount,682IDirect3DVertexBuffer9 *pDestBuffer,683IDirect3DVertexDeclaration9 *pVertexDecl,684DWORD Flags );685686HRESULT NINE_WINAPI687NineDevice9_CreateVertexDeclaration( struct NineDevice9 *This,688const D3DVERTEXELEMENT9 *pVertexElements,689IDirect3DVertexDeclaration9 **ppDecl );690691HRESULT NINE_WINAPI692NineDevice9_SetVertexDeclaration( struct NineDevice9 *This,693IDirect3DVertexDeclaration9 *pDecl );694695HRESULT NINE_WINAPI696NineDevice9_GetVertexDeclaration( struct NineDevice9 *This,697IDirect3DVertexDeclaration9 **ppDecl );698699HRESULT NINE_WINAPI700NineDevice9_SetFVF( struct NineDevice9 *This,701DWORD FVF );702703HRESULT NINE_WINAPI704NineDevice9_GetFVF( struct NineDevice9 *This,705DWORD *pFVF );706707HRESULT NINE_WINAPI708NineDevice9_CreateVertexShader( struct NineDevice9 *This,709const DWORD *pFunction,710IDirect3DVertexShader9 **ppShader );711712HRESULT NINE_WINAPI713NineDevice9_SetVertexShader( struct NineDevice9 *This,714IDirect3DVertexShader9 *pShader );715716HRESULT NINE_WINAPI717NineDevice9_GetVertexShader( struct NineDevice9 *This,718IDirect3DVertexShader9 **ppShader );719720HRESULT NINE_WINAPI721NineDevice9_SetVertexShaderConstantF( struct NineDevice9 *This,722UINT StartRegister,723const float *pConstantData,724UINT Vector4fCount );725726HRESULT NINE_WINAPI727NineDevice9_GetVertexShaderConstantF( struct NineDevice9 *This,728UINT StartRegister,729float *pConstantData,730UINT Vector4fCount );731732HRESULT NINE_WINAPI733NineDevice9_SetVertexShaderConstantI( struct NineDevice9 *This,734UINT StartRegister,735const int *pConstantData,736UINT Vector4iCount );737738HRESULT NINE_WINAPI739NineDevice9_GetVertexShaderConstantI( struct NineDevice9 *This,740UINT StartRegister,741int *pConstantData,742UINT Vector4iCount );743744HRESULT NINE_WINAPI745NineDevice9_SetVertexShaderConstantB( struct NineDevice9 *This,746UINT StartRegister,747const BOOL *pConstantData,748UINT BoolCount );749750HRESULT NINE_WINAPI751NineDevice9_GetVertexShaderConstantB( struct NineDevice9 *This,752UINT StartRegister,753BOOL *pConstantData,754UINT BoolCount );755756HRESULT NINE_WINAPI757NineDevice9_SetStreamSource( struct NineDevice9 *This,758UINT StreamNumber,759IDirect3DVertexBuffer9 *pStreamData,760UINT OffsetInBytes,761UINT Stride );762763HRESULT NINE_WINAPI764NineDevice9_GetStreamSource( struct NineDevice9 *This,765UINT StreamNumber,766IDirect3DVertexBuffer9 **ppStreamData,767UINT *pOffsetInBytes,768UINT *pStride );769770HRESULT NINE_WINAPI771NineDevice9_SetStreamSourceFreq( struct NineDevice9 *This,772UINT StreamNumber,773UINT Setting );774775HRESULT NINE_WINAPI776NineDevice9_GetStreamSourceFreq( struct NineDevice9 *This,777UINT StreamNumber,778UINT *pSetting );779780HRESULT NINE_WINAPI781NineDevice9_SetIndices( struct NineDevice9 *This,782IDirect3DIndexBuffer9 *pIndexData );783784HRESULT NINE_WINAPI785NineDevice9_GetIndices( struct NineDevice9 *This,786IDirect3DIndexBuffer9 **ppIndexData /*,787UINT *pBaseVertexIndex */ );788789HRESULT NINE_WINAPI790NineDevice9_CreatePixelShader( struct NineDevice9 *This,791const DWORD *pFunction,792IDirect3DPixelShader9 **ppShader );793794HRESULT NINE_WINAPI795NineDevice9_SetPixelShader( struct NineDevice9 *This,796IDirect3DPixelShader9 *pShader );797798HRESULT NINE_WINAPI799NineDevice9_GetPixelShader( struct NineDevice9 *This,800IDirect3DPixelShader9 **ppShader );801802HRESULT NINE_WINAPI803NineDevice9_SetPixelShaderConstantF( struct NineDevice9 *This,804UINT StartRegister,805const float *pConstantData,806UINT Vector4fCount );807808HRESULT NINE_WINAPI809NineDevice9_GetPixelShaderConstantF( struct NineDevice9 *This,810UINT StartRegister,811float *pConstantData,812UINT Vector4fCount );813814HRESULT NINE_WINAPI815NineDevice9_SetPixelShaderConstantI( struct NineDevice9 *This,816UINT StartRegister,817const int *pConstantData,818UINT Vector4iCount );819820HRESULT NINE_WINAPI821NineDevice9_GetPixelShaderConstantI( struct NineDevice9 *This,822UINT StartRegister,823int *pConstantData,824UINT Vector4iCount );825826HRESULT NINE_WINAPI827NineDevice9_SetPixelShaderConstantB( struct NineDevice9 *This,828UINT StartRegister,829const BOOL *pConstantData,830UINT BoolCount );831832HRESULT NINE_WINAPI833NineDevice9_GetPixelShaderConstantB( struct NineDevice9 *This,834UINT StartRegister,835BOOL *pConstantData,836UINT BoolCount );837838HRESULT NINE_WINAPI839NineDevice9_DrawRectPatch( struct NineDevice9 *This,840UINT Handle,841const float *pNumSegs,842const D3DRECTPATCH_INFO *pRectPatchInfo );843844HRESULT NINE_WINAPI845NineDevice9_DrawTriPatch( struct NineDevice9 *This,846UINT Handle,847const float *pNumSegs,848const D3DTRIPATCH_INFO *pTriPatchInfo );849850HRESULT NINE_WINAPI851NineDevice9_DeletePatch( struct NineDevice9 *This,852UINT Handle );853854HRESULT NINE_WINAPI855NineDevice9_CreateQuery( struct NineDevice9 *This,856D3DQUERYTYPE Type,857IDirect3DQuery9 **ppQuery );858859#endif /* _NINE_DEVICE9_H_ */860861862