2017-10-11 03:09:04 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "dxgi_object.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
class DxgiAdapter;
|
2018-04-12 13:38:22 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* \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(
|
2018-04-12 01:51:28 +02:00
|
|
|
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(
|
2018-04-14 12:02:55 +02:00
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetParent(
|
2018-04-14 12:02:55 +02:00
|
|
|
REFIID riid,
|
|
|
|
void** ppParent) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE FindClosestMatchingMode(
|
2018-04-14 12:02:55 +02:00
|
|
|
const DXGI_MODE_DESC* pModeToMatch,
|
|
|
|
DXGI_MODE_DESC* pClosestMatch,
|
|
|
|
IUnknown* pConcernedDevice) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetDesc(
|
2018-04-14 12:02:55 +02:00
|
|
|
DXGI_OUTPUT_DESC* pDesc) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetDisplayModeList(
|
2018-04-14 12:02:55 +02:00
|
|
|
DXGI_FORMAT EnumFormat,
|
|
|
|
UINT Flags,
|
|
|
|
UINT* pNumModes,
|
|
|
|
DXGI_MODE_DESC* pDesc) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetDisplaySurfaceData(
|
2018-04-14 12:02:55 +02:00
|
|
|
IDXGISurface* pDestination) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetFrameStatistics(
|
2018-04-14 12:02:55 +02:00
|
|
|
DXGI_FRAME_STATISTICS* pStats) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetGammaControl(
|
2018-04-14 12:02:55 +02:00
|
|
|
DXGI_GAMMA_CONTROL* pArray) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
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(
|
2018-04-14 12:02:55 +02:00
|
|
|
IDXGISurface* pScanoutSurface) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE SetGammaControl(
|
2018-04-14 12:02:55 +02:00
|
|
|
const DXGI_GAMMA_CONTROL* pArray) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE TakeOwnership(
|
2018-04-14 12:02:55 +02:00
|
|
|
IUnknown* pDevice,
|
|
|
|
BOOL Exclusive) final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE WaitForVBlank() final;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
2018-04-29 23:03:27 +02:00
|
|
|
HRESULT GetDisplayMode(
|
|
|
|
DXGI_MODE_DESC* pMode,
|
|
|
|
DWORD ModeNum);
|
|
|
|
|
|
|
|
HRESULT SetDisplayMode(
|
|
|
|
const DXGI_MODE_DESC* pMode);
|
|
|
|
|
2017-10-11 03:09:04 +02:00
|
|
|
private:
|
|
|
|
|
2018-04-12 01:51:28 +02:00
|
|
|
Com<DxgiAdapter> m_adapter = nullptr;
|
2018-01-13 16:32:46 +01:00
|
|
|
HMONITOR m_monitor = nullptr;
|
|
|
|
|
|
|
|
uint32_t GetFormatBpp(DXGI_FORMAT Format) const;
|
2017-10-11 03:09:04 +02:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|