X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_output%2Fmsw%2Fcommon.h;h=2aeeba730fbe1ac493cc67b33b3bf2543e4d0f2d;hb=3957f7a809ef1d612cf29d1fd54206232ec67f41;hp=8de45c5a0e1e9050bdc44081c6d2d080514bdaa5;hpb=302523b2ae794b3a61c1c62a5f56c160a9e8ccd9;p=vlc diff --git a/modules/video_output/msw/common.h b/modules/video_output/msw/common.h index 8de45c5a0e..2aeeba730f 100644 --- a/modules/video_output/msw/common.h +++ b/modules/video_output/msw/common.h @@ -6,6 +6,7 @@ * * Authors: Gildas Bazin * Damien Fouilleul + * Martell Malone * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by @@ -25,8 +26,18 @@ #ifdef MODULE_NAME_IS_directdraw # include #endif -#ifdef MODULE_NAME_IS_direct3d +#ifdef MODULE_NAME_IS_direct3d11 +# include +# if VLC_WINSTORE_APP +# include +# else +# include +#endif +# include +#endif +#ifdef MODULE_NAME_IS_direct3d9 # include +# include #endif #ifdef MODULE_NAME_IS_glwin32 # include "../opengl.h" @@ -134,7 +145,41 @@ struct vout_display_sys_t ID2D1Bitmap *d2_bitmap; /* D2 bitmap */ #endif -#ifdef MODULE_NAME_IS_direct3d +#ifdef MODULE_NAME_IS_direct3d11 +#if !VLC_WINSTORE_APP + HINSTANCE hdxgi_dll; /* handle of the opened dxgi dll */ + HINSTANCE hd3d11_dll; /* handle of the opened d3d11 dll */ + HINSTANCE hd3dcompiler_dll; /* handle of the opened d3dcompiler dll */ + IDXGIAdapter *dxgiadapter; /* DXGI adapter */ + IDXGIFactory *dxgifactory; /* DXGI factory */ + IDXGISwapChain *dxgiswapChain; /* DXGI 1.0 swap chain */ + /* We should find a better way to store this or atleast a shorter name */ + PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN OurD3D11CreateDeviceAndSwapChain; + PFN_D3D11_CREATE_DEVICE OurD3D11CreateDevice; + pD3DCompile OurD3DCompile; +#else + IDXGISwapChain1 *dxgiswapChain; /* DXGI 1.1 swap chain */ +#endif + ID3D11Device *d3ddevice; /* D3D device */ + ID3D11DeviceContext *d3dcontext; /* D3D context */ + ID3D11Texture2D *d3dtexture; + ID3D11ShaderResourceView *d3dresViewY; + ID3D11ShaderResourceView *d3dresViewUV; + ID3D11RenderTargetView *d3drenderTargetView; + ID3D11DepthStencilView *d3ddepthStencilView; + ID3D11VertexShader *d3dvertexShader; + ID3D11PixelShader *d3dpixelShader; + ID3D11InputLayout *d3dvertexLayout; + ID3D11SamplerState *d3dsampState; + picture_sys_t *picsys; + D3D_FEATURE_LEVEL d3dfeaturelevel; + DXGI_FORMAT d3dFormatTex; + DXGI_FORMAT d3dFormatY; + DXGI_FORMAT d3dFormatUV; + vlc_fourcc_t vlcFormat; +#endif + +#ifdef MODULE_NAME_IS_direct3d9 bool allow_hw_yuv; /* Should we use hardware YUV->RGB conversions */ /* show video on desktop window ? */ bool use_desktop; @@ -147,6 +192,8 @@ struct vout_display_sys_t // core objects HINSTANCE hd3d9_dll; /* handle of the opened d3d9 dll */ + HINSTANCE hd3d9x_dll; /* handle of the opened d3d9x dll */ + IDirect3DPixelShader9* d3dx_shader; LPDIRECT3D9 d3dobj; D3DCAPS9 d3dcaps; LPDIRECT3DDEVICE9 d3ddev; @@ -164,6 +211,7 @@ struct vout_display_sys_t /* */ bool reset_device; bool reopen_device; + bool lost_not_ready; bool clear_scene; /* It protects the following variables */ @@ -205,6 +253,8 @@ void UpdateRects (vout_display_t *, bool is_forced); void AlignRect(RECT *, int align_boundary, int align_size); +picture_pool_t *CommonPool(vout_display_t *, unsigned); + /***************************************************************************** * Constants *****************************************************************************/