Home | History | Annotate | Download | only in nine
      1 /*
      2  * Copyright 2011 Joakim Sindholt <opensource (at) 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_DEVICE9EX_H_
     24 #define _NINE_DEVICE9EX_H_
     25 
     26 #include "device9.h"
     27 
     28 struct NineDevice9Ex
     29 {
     30     struct NineDevice9 base;
     31 };
     32 static inline struct NineDevice9Ex *
     33 NineDevice9Ex( void *data )
     34 {
     35     return (struct NineDevice9Ex *)data;
     36 }
     37 
     38 HRESULT
     39 NineDevice9Ex_new( struct pipe_screen *pScreen,
     40                    D3DDEVICE_CREATION_PARAMETERS *pCreationParameters,
     41                    D3DCAPS9 *pCaps,
     42                    D3DPRESENT_PARAMETERS *pPresentationParameters,
     43                    D3DDISPLAYMODEEX *pFullscreenDisplayMode,
     44                    IDirect3D9Ex *pD3D9Ex,
     45                    ID3DPresentGroup *pPresentationGroup,
     46                    struct d3dadapter9_context *pCTX,
     47                    struct NineDevice9Ex **ppOut,
     48                    int minorVersionNum );
     49 
     50 HRESULT NINE_WINAPI
     51 NineDevice9Ex_SetConvolutionMonoKernel( struct NineDevice9Ex *This,
     52                                         UINT width,
     53                                         UINT height,
     54                                         float *rows,
     55                                         float *columns );
     56 
     57 HRESULT NINE_WINAPI
     58 NineDevice9Ex_ComposeRects( struct NineDevice9Ex *This,
     59                             IDirect3DSurface9 *pSrc,
     60                             IDirect3DSurface9 *pDst,
     61                             IDirect3DVertexBuffer9 *pSrcRectDescs,
     62                             UINT NumRects,
     63                             IDirect3DVertexBuffer9 *pDstRectDescs,
     64                             D3DCOMPOSERECTSOP Operation,
     65                             int Xoffset,
     66                             int Yoffset );
     67 
     68 HRESULT NINE_WINAPI
     69 NineDevice9Ex_PresentEx( struct NineDevice9Ex *This,
     70                          const RECT *pSourceRect,
     71                          const RECT *pDestRect,
     72                          HWND hDestWindowOverride,
     73                          const RGNDATA *pDirtyRegion,
     74                          DWORD dwFlags );
     75 
     76 HRESULT NINE_WINAPI
     77 NineDevice9Ex_Present( struct NineDevice9Ex *This,
     78                      const RECT *pSourceRect,
     79                      const RECT *pDestRect,
     80                      HWND hDestWindowOverride,
     81                      const RGNDATA *pDirtyRegion );
     82 
     83 HRESULT NINE_WINAPI
     84 NineDevice9Ex_GetGPUThreadPriority( struct NineDevice9Ex *This,
     85                                     INT *pPriority );
     86 
     87 HRESULT NINE_WINAPI
     88 NineDevice9Ex_SetGPUThreadPriority( struct NineDevice9Ex *This,
     89                                     INT Priority );
     90 
     91 HRESULT NINE_WINAPI
     92 NineDevice9Ex_WaitForVBlank( struct NineDevice9Ex *This,
     93                              UINT iSwapChain );
     94 
     95 HRESULT NINE_WINAPI
     96 NineDevice9Ex_CheckResourceResidency( struct NineDevice9Ex *This,
     97                                       IDirect3DResource9 **pResourceArray,
     98                                       UINT32 NumResources );
     99 
    100 HRESULT NINE_WINAPI
    101 NineDevice9Ex_SetMaximumFrameLatency( struct NineDevice9Ex *This,
    102                                       UINT MaxLatency );
    103 
    104 HRESULT NINE_WINAPI
    105 NineDevice9Ex_GetMaximumFrameLatency( struct NineDevice9Ex *This,
    106                                       UINT *pMaxLatency );
    107 
    108 HRESULT NINE_WINAPI
    109 NineDevice9Ex_CheckDeviceState( struct NineDevice9Ex *This,
    110                                 HWND hDestinationWindow );
    111 
    112 HRESULT NINE_WINAPI
    113 NineDevice9Ex_CreateRenderTargetEx( struct NineDevice9Ex *This,
    114                                     UINT Width,
    115                                     UINT Height,
    116                                     D3DFORMAT Format,
    117                                     D3DMULTISAMPLE_TYPE MultiSample,
    118                                     DWORD MultisampleQuality,
    119                                     BOOL Lockable,
    120                                     IDirect3DSurface9 **ppSurface,
    121                                     HANDLE *pSharedHandle,
    122                                     DWORD Usage );
    123 
    124 HRESULT NINE_WINAPI
    125 NineDevice9Ex_CreateOffscreenPlainSurfaceEx( struct NineDevice9Ex *This,
    126                                              UINT Width,
    127                                              UINT Height,
    128                                              D3DFORMAT Format,
    129                                              D3DPOOL Pool,
    130                                              IDirect3DSurface9 **ppSurface,
    131                                              HANDLE *pSharedHandle,
    132                                              DWORD Usage );
    133 
    134 HRESULT NINE_WINAPI
    135 NineDevice9Ex_CreateDepthStencilSurfaceEx( struct NineDevice9Ex *This,
    136                                            UINT Width,
    137                                            UINT Height,
    138                                            D3DFORMAT Format,
    139                                            D3DMULTISAMPLE_TYPE MultiSample,
    140                                            DWORD MultisampleQuality,
    141                                            BOOL Discard,
    142                                            IDirect3DSurface9 **ppSurface,
    143                                            HANDLE *pSharedHandle,
    144                                            DWORD Usage );
    145 
    146 HRESULT NINE_WINAPI
    147 NineDevice9Ex_ResetEx( struct NineDevice9Ex *This,
    148                        D3DPRESENT_PARAMETERS *pPresentationParameters,
    149                        D3DDISPLAYMODEEX *pFullscreenDisplayMode );
    150 
    151 HRESULT NINE_WINAPI
    152 NineDevice9Ex_Reset( struct NineDevice9Ex *This,
    153                      D3DPRESENT_PARAMETERS *pPresentationParameters );
    154 
    155 HRESULT NINE_WINAPI
    156 NineDevice9Ex_GetDisplayModeEx( struct NineDevice9Ex *This,
    157                                 UINT iSwapChain,
    158                                 D3DDISPLAYMODEEX *pMode,
    159                                 D3DDISPLAYROTATION *pRotation );
    160 
    161 HRESULT NINE_WINAPI
    162 NineDevice9Ex_TestCooperativeLevel( struct NineDevice9Ex *This );
    163 
    164 #endif /* _NINE_DEVICE9EX_H_ */
    165