Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
DX::DeviceResources Class Reference

#include <DeviceResources.h>

Public Member Functions

 DeviceResources ()
 
virtual ~DeviceResources ()
 
void Release ()
 
void ValidateDevice ()
 
void HandleDeviceLost (bool removed)
 
bool Begin ()
 
void Present ()
 
winrt::Windows::Foundation::Size GetOutputSize () const
 
winrt::Windows::Foundation::Size GetLogicalSize () const
 
void SetLogicalSize (float width, float height)
 
float GetDpi () const
 
void SetDpi (float dpi)
 
bool HasValidDevice () const
 
ID3D11Device1 * GetD3DDevice () const
 
ID3D11DeviceContext1 * GetD3DContext () const
 
ID3D11DeviceContext1 * GetImmediateContext () const
 
IDXGISwapChain1 * GetSwapChain () const
 
IDXGIFactory2 * GetIDXGIFactory2 () const
 
IDXGIAdapter1 * GetAdapter () const
 
ID3D11DepthStencilView * GetDSV () const
 
D3D_FEATURE_LEVEL GetDeviceFeatureLevel () const
 
CD3DTextureGetBackBuffer ()
 
void GetOutput (IDXGIOutput **ppOutput) const
 
void GetCachedOutputAndDesc (IDXGIOutput **output, DXGI_OUTPUT_DESC *outputDesc) const
 Retrieve current output and output description. Use cached data first to avoid delays due to dxgi internal multithreading synchronization.
 
DXGI_ADAPTER_DESC GetAdapterDesc () const
 
void GetDisplayMode (DXGI_MODE_DESC *mode) const
 
D3D11_VIEWPORT GetScreenViewport () const
 
void SetViewPort (D3D11_VIEWPORT &viewPort) const
 
void ReleaseBackBuffer ()
 
void CreateBackBuffer ()
 
void ResizeBuffers ()
 
bool SetFullScreen (bool fullscreen, RESOLUTION_INFO &res)
 
void ApplyDisplaySettings ()
 
HDR_STATUS ToggleHDR ()
 
void SetHdrMetaData (DXGI_HDR_METADATA_HDR10 &hdr10) const
 
void SetHdrColorSpace (const DXGI_COLOR_SPACE_TYPE colorSpace)
 
bool IsHDROutput () const
 
bool IsTransferPQ () const
 
void Register (ID3DResource *resource)
 
void Unregister (ID3DResource *resource)
 
void FinishCommandList (bool bExecute=true) const
 
void ClearDepthStencil () const
 
void ClearRenderTarget (ID3D11RenderTargetView *pRTView, float color[4]) const
 
void RegisterDeviceNotify (IDeviceNotify *deviceNotify)
 
bool IsStereoAvailable () const
 
bool IsStereoEnabled () const
 
void SetStereoIdx (byte idx)
 
void SetMonitor (HMONITOR monitor)
 
HMONITOR GetMonitor () const
 
bool IsNV12SharedTexturesSupported () const
 
bool IsDXVA2SharedDecoderSurfaces () const
 
bool IsSuperResolutionSupported () const
 
bool UseFence () const
 
DEBUG_INFO_RENDER GetDebugInfo () const
 
std::vector< DXGI_COLOR_SPACE_TYPE > GetSwapChainColorSpaces () const
 
bool SetMultithreadProtected (bool enabled) const
 
bool IsGCNOrOlder () const
 

Static Public Member Functions

static std::shared_ptr< DX::DeviceResourcesGet ()
 

Constructor & Destructor Documentation

◆ DeviceResources()

DX::DeviceResources::DeviceResources ( )

◆ ~DeviceResources()

DX::DeviceResources::~DeviceResources ( )
virtualdefault

Member Function Documentation

◆ ApplyDisplaySettings()

void DX::DeviceResources::ApplyDisplaySettings ( )

◆ Begin()

bool DX::DeviceResources::Begin ( )

◆ ClearDepthStencil()

void DX::DeviceResources::ClearDepthStencil ( ) const

◆ ClearRenderTarget()

void DX::DeviceResources::ClearRenderTarget ( ID3D11RenderTargetView * pRTView,
float color[4] ) const

◆ CreateBackBuffer()

void DX::DeviceResources::CreateBackBuffer ( )

◆ FinishCommandList()

void DX::DeviceResources::FinishCommandList ( bool bExecute = true) const

◆ Get()

std::shared_ptr< DX::DeviceResources > DX::DeviceResources::Get ( )
static

◆ GetAdapter()

IDXGIAdapter1 * DX::DeviceResources::GetAdapter ( ) const
inline

◆ GetAdapterDesc()

DXGI_ADAPTER_DESC DX::DeviceResources::GetAdapterDesc ( ) const

◆ GetBackBuffer()

CD3DTexture & DX::DeviceResources::GetBackBuffer ( )
inline

◆ GetCachedOutputAndDesc()

void DX::DeviceResources::GetCachedOutputAndDesc ( IDXGIOutput ** output,
DXGI_OUTPUT_DESC * outputDesc ) const

Retrieve current output and output description. Use cached data first to avoid delays due to dxgi internal multithreading synchronization.

Parameters
outputThe output
outputDescThe output description

◆ GetD3DContext()

ID3D11DeviceContext1 * DX::DeviceResources::GetD3DContext ( ) const
inline

◆ GetD3DDevice()

ID3D11Device1 * DX::DeviceResources::GetD3DDevice ( ) const
inline

◆ GetDebugInfo()

DEBUG_INFO_RENDER DX::DeviceResources::GetDebugInfo ( ) const

◆ GetDeviceFeatureLevel()

D3D_FEATURE_LEVEL DX::DeviceResources::GetDeviceFeatureLevel ( ) const
inline

◆ GetDisplayMode()

void DX::DeviceResources::GetDisplayMode ( DXGI_MODE_DESC * mode) const

◆ GetDpi()

float DX::DeviceResources::GetDpi ( ) const
inline

◆ GetDSV()

ID3D11DepthStencilView * DX::DeviceResources::GetDSV ( ) const
inline

◆ GetIDXGIFactory2()

IDXGIFactory2 * DX::DeviceResources::GetIDXGIFactory2 ( ) const
inline

◆ GetImmediateContext()

ID3D11DeviceContext1 * DX::DeviceResources::GetImmediateContext ( ) const
inline

◆ GetLogicalSize()

winrt::Windows::Foundation::Size DX::DeviceResources::GetLogicalSize ( ) const
inline

◆ GetMonitor()

HMONITOR DX::DeviceResources::GetMonitor ( ) const

◆ GetOutput()

void DX::DeviceResources::GetOutput ( IDXGIOutput ** ppOutput) const

◆ GetOutputSize()

winrt::Windows::Foundation::Size DX::DeviceResources::GetOutputSize ( ) const
inline

◆ GetScreenViewport()

D3D11_VIEWPORT DX::DeviceResources::GetScreenViewport ( ) const
inline

◆ GetSwapChain()

IDXGISwapChain1 * DX::DeviceResources::GetSwapChain ( ) const
inline

◆ GetSwapChainColorSpaces()

std::vector< DXGI_COLOR_SPACE_TYPE > DX::DeviceResources::GetSwapChainColorSpaces ( ) const

◆ HandleDeviceLost()

void DX::DeviceResources::HandleDeviceLost ( bool removed)

◆ HasValidDevice()

bool DX::DeviceResources::HasValidDevice ( ) const
inline

◆ IsDXVA2SharedDecoderSurfaces()

bool DX::DeviceResources::IsDXVA2SharedDecoderSurfaces ( ) const
inline

◆ IsGCNOrOlder()

bool DX::DeviceResources::IsGCNOrOlder ( ) const

◆ IsHDROutput()

bool DX::DeviceResources::IsHDROutput ( ) const
inline

◆ IsNV12SharedTexturesSupported()

bool DX::DeviceResources::IsNV12SharedTexturesSupported ( ) const
inline

◆ IsStereoAvailable()

bool DX::DeviceResources::IsStereoAvailable ( ) const

◆ IsStereoEnabled()

bool DX::DeviceResources::IsStereoEnabled ( ) const
inline

◆ IsSuperResolutionSupported()

bool DX::DeviceResources::IsSuperResolutionSupported ( ) const
inline

◆ IsTransferPQ()

bool DX::DeviceResources::IsTransferPQ ( ) const
inline

◆ Present()

void DX::DeviceResources::Present ( )

◆ Register()

void DX::DeviceResources::Register ( ID3DResource * resource)

◆ RegisterDeviceNotify()

void DX::DeviceResources::RegisterDeviceNotify ( IDeviceNotify * deviceNotify)

◆ Release()

void DX::DeviceResources::Release ( )

◆ ReleaseBackBuffer()

void DX::DeviceResources::ReleaseBackBuffer ( )

◆ ResizeBuffers()

void DX::DeviceResources::ResizeBuffers ( )

◆ SetDpi()

void DX::DeviceResources::SetDpi ( float dpi)

◆ SetFullScreen()

bool DX::DeviceResources::SetFullScreen ( bool fullscreen,
RESOLUTION_INFO & res )

◆ SetHdrColorSpace()

void DX::DeviceResources::SetHdrColorSpace ( const DXGI_COLOR_SPACE_TYPE colorSpace)

◆ SetHdrMetaData()

void DX::DeviceResources::SetHdrMetaData ( DXGI_HDR_METADATA_HDR10 & hdr10) const

◆ SetLogicalSize()

void DX::DeviceResources::SetLogicalSize ( float width,
float height )

◆ SetMonitor()

void DX::DeviceResources::SetMonitor ( HMONITOR monitor)

◆ SetMultithreadProtected()

bool DX::DeviceResources::SetMultithreadProtected ( bool enabled) const

◆ SetStereoIdx()

void DX::DeviceResources::SetStereoIdx ( byte idx)
inline

◆ SetViewPort()

void DX::DeviceResources::SetViewPort ( D3D11_VIEWPORT & viewPort) const

◆ ToggleHDR()

HDR_STATUS DX::DeviceResources::ToggleHDR ( )

◆ Unregister()

void DX::DeviceResources::Unregister ( ID3DResource * resource)

◆ UseFence()

bool DX::DeviceResources::UseFence ( ) const
inline

◆ ValidateDevice()

void DX::DeviceResources::ValidateDevice ( )

The documentation for this class was generated from the following files: