1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-23 08:52:12 +01:00
dxvk/src/dxgi/dxgi_output.h

90 lines
2.3 KiB
C
Raw Normal View History

2017-10-11 03:09:04 +02:00
#pragma once
#include "dxgi_object.h"
namespace dxvk {
class DxgiAdapter;
/**
* \brief Per-output data
*
* Persistent data for a single output, which
* is addressed using the \c HMONITOR handle.
*/
struct DXGI_VK_OUTPUT_DATA {
DXGI_FRAME_STATISTICS FrameStats;
DXGI_GAMMA_CONTROL GammaCurve;
BOOL GammaDirty;
};
2017-10-11 03:09:04 +02:00
class DxgiOutput : public DxgiObject<IDXGIOutput> {
public:
DxgiOutput(
const Com<DxgiAdapter>& adapter,
HMONITOR monitor);
2017-10-11 03:09:04 +02:00
~DxgiOutput();
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE QueryInterface(
2017-10-11 03:09:04 +02:00
REFIID riid,
void **ppvObject) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetParent(
2017-10-11 03:09:04 +02:00
REFIID riid,
void **ppParent) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE FindClosestMatchingMode(
2017-10-11 03:09:04 +02:00
const DXGI_MODE_DESC *pModeToMatch,
DXGI_MODE_DESC *pClosestMatch,
IUnknown *pConcernedDevice) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDesc(
2017-10-11 03:09:04 +02:00
DXGI_OUTPUT_DESC *pDesc) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDisplayModeList(
2017-10-11 03:09:04 +02:00
DXGI_FORMAT EnumFormat,
UINT Flags,
UINT *pNumModes,
DXGI_MODE_DESC *pDesc) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData(
2017-10-11 03:09:04 +02:00
IDXGISurface *pDestination) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetFrameStatistics(
2017-10-11 03:09:04 +02:00
DXGI_FRAME_STATISTICS *pStats) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetGammaControl(
2017-10-11 03:09:04 +02:00
DXGI_GAMMA_CONTROL *pArray) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetGammaControlCapabilities(
2017-10-11 03:09:04 +02:00
DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) final;
2017-12-12 12:50:52 +01:00
void STDMETHODCALLTYPE ReleaseOwnership() final;
2017-10-11 03:09:04 +02:00
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE SetDisplaySurface(
2017-10-11 03:09:04 +02:00
IDXGISurface *pScanoutSurface) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE SetGammaControl(
2017-10-11 03:09:04 +02:00
const DXGI_GAMMA_CONTROL *pArray) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE TakeOwnership(
2017-10-11 03:09:04 +02:00
IUnknown *pDevice,
BOOL Exclusive) final;
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE WaitForVBlank() final;
2017-10-11 03:09:04 +02:00
private:
Com<DxgiAdapter> m_adapter = nullptr;
HMONITOR m_monitor = nullptr;
uint32_t GetFormatBpp(DXGI_FORMAT Format) const;
2017-10-11 03:09:04 +02:00
};
}