mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxgi] Implement IDXGIOutput6
This commit is contained in:
parent
15f5efe4c3
commit
5d0efd87c2
@ -57,7 +57,8 @@ namespace dxvk {
|
||||
|| riid == __uuidof(IDXGIOutput2)
|
||||
|| riid == __uuidof(IDXGIOutput3)
|
||||
|| riid == __uuidof(IDXGIOutput4)
|
||||
|| riid == __uuidof(IDXGIOutput5)) {
|
||||
|| riid == __uuidof(IDXGIOutput5)
|
||||
|| riid == __uuidof(IDXGIOutput6)) {
|
||||
*ppvObject = ref(this);
|
||||
return S_OK;
|
||||
}
|
||||
@ -201,6 +202,26 @@ namespace dxvk {
|
||||
if (pDesc == nullptr)
|
||||
return DXGI_ERROR_INVALID_CALL;
|
||||
|
||||
DXGI_OUTPUT_DESC1 desc;
|
||||
HRESULT hr = GetDesc1(&desc);
|
||||
|
||||
if (SUCCEEDED(hr)) {
|
||||
std::memcpy(pDesc->DeviceName, desc.DeviceName, sizeof(pDesc->DeviceName));
|
||||
pDesc->DesktopCoordinates = desc.DesktopCoordinates;
|
||||
pDesc->AttachedToDesktop = desc.AttachedToDesktop;
|
||||
pDesc->Rotation = desc.Rotation;
|
||||
pDesc->Monitor = desc.Monitor;
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE DxgiOutput::GetDesc1(
|
||||
DXGI_OUTPUT_DESC1* pDesc) {
|
||||
if (pDesc == nullptr)
|
||||
return DXGI_ERROR_INVALID_CALL;
|
||||
|
||||
::MONITORINFOEXW monInfo;
|
||||
monInfo.cbSize = sizeof(monInfo);
|
||||
|
||||
@ -215,6 +236,20 @@ namespace dxvk {
|
||||
pDesc->AttachedToDesktop = 1;
|
||||
pDesc->Rotation = DXGI_MODE_ROTATION_UNSPECIFIED;
|
||||
pDesc->Monitor = m_monitor;
|
||||
pDesc->BitsPerColor = 8;
|
||||
pDesc->ColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709;
|
||||
|
||||
// We don't really have a way to get these
|
||||
for (uint32_t i = 0; i < 2; i++) {
|
||||
pDesc->RedPrimary[i] = 0.0f;
|
||||
pDesc->GreenPrimary[i] = 0.0f;
|
||||
pDesc->BluePrimary[i] = 0.0f;
|
||||
pDesc->WhitePoint[i] = 0.0f;
|
||||
}
|
||||
|
||||
pDesc->MinLuminance = 0.0f;
|
||||
pDesc->MaxLuminance = 0.0f;
|
||||
pDesc->MaxFullFrameLuminance = 0.0f;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
@ -475,6 +510,15 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE DxgiOutput::CheckHardwareCompositionSupport(
|
||||
UINT* pFlags) {
|
||||
Logger::warn("DxgiOutput: CheckHardwareCompositionSupport: Stub");
|
||||
|
||||
*pFlags = 0;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
|
||||
void DxgiOutput::FilterModesByDesc(
|
||||
std::vector<DXGI_MODE_DESC1>& Modes,
|
||||
const DXGI_MODE_DESC1& TargetMode) {
|
||||
|
@ -24,7 +24,7 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
class DxgiOutput : public DxgiObject<IDXGIOutput5> {
|
||||
class DxgiOutput : public DxgiObject<IDXGIOutput6> {
|
||||
|
||||
public:
|
||||
|
||||
@ -56,6 +56,9 @@ namespace dxvk {
|
||||
HRESULT STDMETHODCALLTYPE GetDesc(
|
||||
DXGI_OUTPUT_DESC* pDesc) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE GetDesc1(
|
||||
DXGI_OUTPUT_DESC1* pDesc) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE GetDisplayModeList(
|
||||
DXGI_FORMAT EnumFormat,
|
||||
UINT Flags,
|
||||
@ -121,6 +124,9 @@ namespace dxvk {
|
||||
IUnknown* pConcernedDevice,
|
||||
UINT* pFlags) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CheckHardwareCompositionSupport(
|
||||
UINT* pFlags) final;
|
||||
|
||||
private:
|
||||
|
||||
DxgiMonitorInfo* m_monitorInfo = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user