dxvk/src/dxgi/dxgi_output.h

97 lines
2.6 KiB
C
Raw Normal View History

2017-10-11 02:09:04 +01: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 02:09:04 +01:00
class DxgiOutput : public DxgiObject<IDXGIOutput> {
public:
DxgiOutput(
const Com<DxgiAdapter>& adapter,
HMONITOR monitor);
2017-10-11 02:09:04 +01:00
~DxgiOutput();
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE QueryInterface(
2018-04-14 11:02:55 +01:00
REFIID riid,
void** ppvObject) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetParent(
2018-04-14 11:02:55 +01:00
REFIID riid,
void** ppParent) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE FindClosestMatchingMode(
2018-04-14 11:02:55 +01:00
const DXGI_MODE_DESC* pModeToMatch,
DXGI_MODE_DESC* pClosestMatch,
IUnknown* pConcernedDevice) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetDesc(
2018-04-14 11:02:55 +01:00
DXGI_OUTPUT_DESC* pDesc) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetDisplayModeList(
2018-04-14 11:02:55 +01:00
DXGI_FORMAT EnumFormat,
UINT Flags,
UINT* pNumModes,
DXGI_MODE_DESC* pDesc) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData(
2018-04-14 11:02:55 +01:00
IDXGISurface* pDestination) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetFrameStatistics(
2018-04-14 11:02:55 +01:00
DXGI_FRAME_STATISTICS* pStats) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetGammaControl(
2018-04-14 11:02:55 +01:00
DXGI_GAMMA_CONTROL* pArray) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE GetGammaControlCapabilities(
2017-10-11 02:09:04 +01:00
DXGI_GAMMA_CONTROL_CAPABILITIES *pGammaCaps) final;
2017-12-12 11:50:52 +00:00
void STDMETHODCALLTYPE ReleaseOwnership() final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE SetDisplaySurface(
2018-04-14 11:02:55 +01:00
IDXGISurface* pScanoutSurface) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE SetGammaControl(
2018-04-14 11:02:55 +01:00
const DXGI_GAMMA_CONTROL* pArray) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE TakeOwnership(
2018-04-14 11:02:55 +01:00
IUnknown* pDevice,
BOOL Exclusive) final;
2017-10-11 02:09:04 +01:00
2017-12-12 11:50:52 +00:00
HRESULT STDMETHODCALLTYPE WaitForVBlank() final;
2017-10-11 02:09:04 +01:00
HRESULT GetDisplayMode(
DXGI_MODE_DESC* pMode,
DWORD ModeNum);
HRESULT SetDisplayMode(
const DXGI_MODE_DESC* pMode);
2017-10-11 02:09:04 +01:00
private:
Com<DxgiAdapter> m_adapter = nullptr;
HMONITOR m_monitor = nullptr;
uint32_t GetFormatBpp(DXGI_FORMAT Format) const;
2017-10-11 02:09:04 +01:00
};
}