Path: blob/21.2-virgl/src/gallium/frontends/nine/adapter9.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_ADAPTER9_H_23#define _NINE_ADAPTER9_H_2425#include "iunknown.h"2627#include "d3dadapter/d3dadapter9.h"2829struct pipe_screen;30struct pipe_resource;3132struct d3dadapter9_context33{34struct pipe_screen *hal, *ref;35D3DADAPTER_IDENTIFIER9 identifier;36BOOL linear_framebuffer;37BOOL throttling;38int throttling_value;39int vblank_mode;40BOOL thread_submit;41BOOL discard_delayed_release;42BOOL tearfree_discard;43int csmt_force;44BOOL dynamic_texture_workaround;45BOOL shader_inline_constants;46int memfd_virtualsizelimit;47int override_vram_size;4849void (*destroy)( struct d3dadapter9_context *ctx );50};5152struct NineAdapter953{54struct NineUnknown base;5556struct d3dadapter9_context *ctx;57};58static inline struct NineAdapter9 *59NineAdapter9( void *data )60{61return (struct NineAdapter9 *)data;62}6364HRESULT65NineAdapter9_new( struct d3dadapter9_context *pCTX,66struct NineAdapter9 **ppOut );6768HRESULT69NineAdapter9_ctor( struct NineAdapter9 *This,70struct NineUnknownParams *pParams,71struct d3dadapter9_context *pCTX );7273void74NineAdapter9_dtor( struct NineAdapter9 *This );7576HRESULT NINE_WINAPI77NineAdapter9_GetAdapterIdentifier( struct NineAdapter9 *This,78DWORD Flags,79D3DADAPTER_IDENTIFIER9 *pIdentifier );8081HRESULT NINE_WINAPI82NineAdapter9_CheckDeviceType( struct NineAdapter9 *This,83D3DDEVTYPE DevType,84D3DFORMAT AdapterFormat,85D3DFORMAT BackBufferFormat,86BOOL bWindowed );8788HRESULT NINE_WINAPI89NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,90D3DDEVTYPE DeviceType,91D3DFORMAT AdapterFormat,92DWORD Usage,93D3DRESOURCETYPE RType,94D3DFORMAT CheckFormat );9596HRESULT NINE_WINAPI97NineAdapter9_CheckDeviceMultiSampleType( struct NineAdapter9 *This,98D3DDEVTYPE DeviceType,99D3DFORMAT SurfaceFormat,100BOOL Windowed,101D3DMULTISAMPLE_TYPE MultiSampleType,102DWORD *pQualityLevels );103104HRESULT NINE_WINAPI105NineAdapter9_CheckDepthStencilMatch( struct NineAdapter9 *This,106D3DDEVTYPE DeviceType,107D3DFORMAT AdapterFormat,108D3DFORMAT RenderTargetFormat,109D3DFORMAT DepthStencilFormat );110111HRESULT NINE_WINAPI112NineAdapter9_CheckDeviceFormatConversion( struct NineAdapter9 *This,113D3DDEVTYPE DeviceType,114D3DFORMAT SourceFormat,115D3DFORMAT TargetFormat );116117HRESULT NINE_WINAPI118NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,119D3DDEVTYPE DeviceType,120D3DCAPS9 *pCaps );121122HRESULT NINE_WINAPI123NineAdapter9_CreateDevice( struct NineAdapter9 *This,124UINT RealAdapter,125D3DDEVTYPE DeviceType,126HWND hFocusWindow,127DWORD BehaviorFlags,128D3DPRESENT_PARAMETERS *pPresentationParameters,129IDirect3D9 *pD3D9,130ID3DPresentGroup *pPresentationGroup,131IDirect3DDevice9 **ppReturnedDeviceInterface );132133HRESULT NINE_WINAPI134NineAdapter9_CreateDeviceEx( struct NineAdapter9 *This,135UINT RealAdapter,136D3DDEVTYPE DeviceType,137HWND hFocusWindow,138DWORD BehaviorFlags,139D3DPRESENT_PARAMETERS *pPresentationParameters,140D3DDISPLAYMODEEX *pFullscreenDisplayMode,141IDirect3D9Ex *pD3D9Ex,142ID3DPresentGroup *pPresentationGroup,143IDirect3DDevice9Ex **ppReturnedDeviceInterface );144145#endif /* _NINE_ADAPTER9_H_ */146147148