1bf215546Sopenharmony_ci/* 2bf215546Sopenharmony_ci * Copyright 2011 Joakim Sindholt <opensource@zhasha.com> 3bf215546Sopenharmony_ci * 4bf215546Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 5bf215546Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 6bf215546Sopenharmony_ci * to deal in the Software without restriction, including without limitation 7bf215546Sopenharmony_ci * on the rights to use, copy, modify, merge, publish, distribute, sub 8bf215546Sopenharmony_ci * license, and/or sell copies of the Software, and to permit persons to whom 9bf215546Sopenharmony_ci * the Software is furnished to do so, subject to the following conditions: 10bf215546Sopenharmony_ci * 11bf215546Sopenharmony_ci * The above copyright notice and this permission notice (including the next 12bf215546Sopenharmony_ci * paragraph) shall be included in all copies or substantial portions of the 13bf215546Sopenharmony_ci * Software. 14bf215546Sopenharmony_ci * 15bf215546Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16bf215546Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17bf215546Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 18bf215546Sopenharmony_ci * THE AUTHOR(S) AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 19bf215546Sopenharmony_ci * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 20bf215546Sopenharmony_ci * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 21bf215546Sopenharmony_ci * USE OR OTHER DEALINGS IN THE SOFTWARE. */ 22bf215546Sopenharmony_ci 23bf215546Sopenharmony_ci#ifndef _NINE_DEVICE9EX_H_ 24bf215546Sopenharmony_ci#define _NINE_DEVICE9EX_H_ 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci#include "device9.h" 27bf215546Sopenharmony_ci 28bf215546Sopenharmony_cistruct NineDevice9Ex 29bf215546Sopenharmony_ci{ 30bf215546Sopenharmony_ci struct NineDevice9 base; 31bf215546Sopenharmony_ci}; 32bf215546Sopenharmony_cistatic inline struct NineDevice9Ex * 33bf215546Sopenharmony_ciNineDevice9Ex( void *data ) 34bf215546Sopenharmony_ci{ 35bf215546Sopenharmony_ci return (struct NineDevice9Ex *)data; 36bf215546Sopenharmony_ci} 37bf215546Sopenharmony_ci 38bf215546Sopenharmony_ciHRESULT 39bf215546Sopenharmony_ciNineDevice9Ex_new( struct pipe_screen *pScreen, 40bf215546Sopenharmony_ci D3DDEVICE_CREATION_PARAMETERS *pCreationParameters, 41bf215546Sopenharmony_ci D3DCAPS9 *pCaps, 42bf215546Sopenharmony_ci D3DPRESENT_PARAMETERS *pPresentationParameters, 43bf215546Sopenharmony_ci D3DDISPLAYMODEEX *pFullscreenDisplayMode, 44bf215546Sopenharmony_ci IDirect3D9Ex *pD3D9Ex, 45bf215546Sopenharmony_ci ID3DPresentGroup *pPresentationGroup, 46bf215546Sopenharmony_ci struct d3dadapter9_context *pCTX, 47bf215546Sopenharmony_ci struct NineDevice9Ex **ppOut, 48bf215546Sopenharmony_ci int minorVersionNum ); 49bf215546Sopenharmony_ci 50bf215546Sopenharmony_ciHRESULT NINE_WINAPI 51bf215546Sopenharmony_ciNineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This, 52bf215546Sopenharmony_ci UINT width, 53bf215546Sopenharmony_ci UINT height, 54bf215546Sopenharmony_ci float *rows, 55bf215546Sopenharmony_ci float *columns ); 56bf215546Sopenharmony_ci 57bf215546Sopenharmony_ciHRESULT NINE_WINAPI 58bf215546Sopenharmony_ciNineDevice9Ex_ComposeRects( struct NineDevice9Ex *This, 59bf215546Sopenharmony_ci IDirect3DSurface9 *pSrc, 60bf215546Sopenharmony_ci IDirect3DSurface9 *pDst, 61bf215546Sopenharmony_ci IDirect3DVertexBuffer9 *pSrcRectDescs, 62bf215546Sopenharmony_ci UINT NumRects, 63bf215546Sopenharmony_ci IDirect3DVertexBuffer9 *pDstRectDescs, 64bf215546Sopenharmony_ci D3DCOMPOSERECTSOP Operation, 65bf215546Sopenharmony_ci int Xoffset, 66bf215546Sopenharmony_ci int Yoffset ); 67bf215546Sopenharmony_ci 68bf215546Sopenharmony_ciHRESULT NINE_WINAPI 69bf215546Sopenharmony_ciNineDevice9Ex_PresentEx( struct NineDevice9Ex *This, 70bf215546Sopenharmony_ci const RECT *pSourceRect, 71bf215546Sopenharmony_ci const RECT *pDestRect, 72bf215546Sopenharmony_ci HWND hDestWindowOverride, 73bf215546Sopenharmony_ci const RGNDATA *pDirtyRegion, 74bf215546Sopenharmony_ci DWORD dwFlags ); 75bf215546Sopenharmony_ci 76bf215546Sopenharmony_ciHRESULT NINE_WINAPI 77bf215546Sopenharmony_ciNineDevice9Ex_Present( struct NineDevice9Ex *This, 78bf215546Sopenharmony_ci const RECT *pSourceRect, 79bf215546Sopenharmony_ci const RECT *pDestRect, 80bf215546Sopenharmony_ci HWND hDestWindowOverride, 81bf215546Sopenharmony_ci const RGNDATA *pDirtyRegion ); 82bf215546Sopenharmony_ci 83bf215546Sopenharmony_ciHRESULT NINE_WINAPI 84bf215546Sopenharmony_ciNineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This, 85bf215546Sopenharmony_ci INT *pPriority ); 86bf215546Sopenharmony_ci 87bf215546Sopenharmony_ciHRESULT NINE_WINAPI 88bf215546Sopenharmony_ciNineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This, 89bf215546Sopenharmony_ci INT Priority ); 90bf215546Sopenharmony_ci 91bf215546Sopenharmony_ciHRESULT NINE_WINAPI 92bf215546Sopenharmony_ciNineDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This, 93bf215546Sopenharmony_ci UINT iSwapChain ); 94bf215546Sopenharmony_ci 95bf215546Sopenharmony_ciHRESULT NINE_WINAPI 96bf215546Sopenharmony_ciNineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This, 97bf215546Sopenharmony_ci IDirect3DResource9 **pResourceArray, 98bf215546Sopenharmony_ci UINT32 NumResources ); 99bf215546Sopenharmony_ci 100bf215546Sopenharmony_ciHRESULT NINE_WINAPI 101bf215546Sopenharmony_ciNineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This, 102bf215546Sopenharmony_ci UINT MaxLatency ); 103bf215546Sopenharmony_ci 104bf215546Sopenharmony_ciHRESULT NINE_WINAPI 105bf215546Sopenharmony_ciNineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This, 106bf215546Sopenharmony_ci UINT *pMaxLatency ); 107bf215546Sopenharmony_ci 108bf215546Sopenharmony_ciHRESULT NINE_WINAPI 109bf215546Sopenharmony_ciNineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This, 110bf215546Sopenharmony_ci HWND hDestinationWindow ); 111bf215546Sopenharmony_ci 112bf215546Sopenharmony_ciHRESULT NINE_WINAPI 113bf215546Sopenharmony_ciNineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This, 114bf215546Sopenharmony_ci UINT Width, 115bf215546Sopenharmony_ci UINT Height, 116bf215546Sopenharmony_ci D3DFORMAT Format, 117bf215546Sopenharmony_ci D3DMULTISAMPLE_TYPE MultiSample, 118bf215546Sopenharmony_ci DWORD MultisampleQuality, 119bf215546Sopenharmony_ci BOOL Lockable, 120bf215546Sopenharmony_ci IDirect3DSurface9 **ppSurface, 121bf215546Sopenharmony_ci HANDLE *pSharedHandle, 122bf215546Sopenharmony_ci DWORD Usage ); 123bf215546Sopenharmony_ci 124bf215546Sopenharmony_ciHRESULT NINE_WINAPI 125bf215546Sopenharmony_ciNineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This, 126bf215546Sopenharmony_ci UINT Width, 127bf215546Sopenharmony_ci UINT Height, 128bf215546Sopenharmony_ci D3DFORMAT Format, 129bf215546Sopenharmony_ci D3DPOOL Pool, 130bf215546Sopenharmony_ci IDirect3DSurface9 **ppSurface, 131bf215546Sopenharmony_ci HANDLE *pSharedHandle, 132bf215546Sopenharmony_ci DWORD Usage ); 133bf215546Sopenharmony_ci 134bf215546Sopenharmony_ciHRESULT NINE_WINAPI 135bf215546Sopenharmony_ciNineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This, 136bf215546Sopenharmony_ci UINT Width, 137bf215546Sopenharmony_ci UINT Height, 138bf215546Sopenharmony_ci D3DFORMAT Format, 139bf215546Sopenharmony_ci D3DMULTISAMPLE_TYPE MultiSample, 140bf215546Sopenharmony_ci DWORD MultisampleQuality, 141bf215546Sopenharmony_ci BOOL Discard, 142bf215546Sopenharmony_ci IDirect3DSurface9 **ppSurface, 143bf215546Sopenharmony_ci HANDLE *pSharedHandle, 144bf215546Sopenharmony_ci DWORD Usage ); 145bf215546Sopenharmony_ci 146bf215546Sopenharmony_ciHRESULT NINE_WINAPI 147bf215546Sopenharmony_ciNineDevice9Ex_ResetEx( struct NineDevice9Ex *This, 148bf215546Sopenharmony_ci D3DPRESENT_PARAMETERS *pPresentationParameters, 149bf215546Sopenharmony_ci D3DDISPLAYMODEEX *pFullscreenDisplayMode ); 150bf215546Sopenharmony_ci 151bf215546Sopenharmony_ciHRESULT NINE_WINAPI 152bf215546Sopenharmony_ciNineDevice9Ex_Reset( struct NineDevice9Ex *This, 153bf215546Sopenharmony_ci D3DPRESENT_PARAMETERS *pPresentationParameters ); 154bf215546Sopenharmony_ci 155bf215546Sopenharmony_ciHRESULT NINE_WINAPI 156bf215546Sopenharmony_ciNineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This, 157bf215546Sopenharmony_ci UINT iSwapChain, 158bf215546Sopenharmony_ci D3DDISPLAYMODEEX *pMode, 159bf215546Sopenharmony_ci D3DDISPLAYROTATION *pRotation ); 160bf215546Sopenharmony_ci 161bf215546Sopenharmony_ciHRESULT NINE_WINAPI 162bf215546Sopenharmony_ciNineDevice9Ex_TestCooperativeLevel( struct NineDevice9Ex *This ); 163bf215546Sopenharmony_ci 164bf215546Sopenharmony_ci#endif /* _NINE_DEVICE9EX_H_ */ 165