1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-09 22:46:08 +01:00
dxvk/src/dxgi/dxgi_adapter.h

86 lines
2.3 KiB
C
Raw Normal View History

2017-10-11 03:09:04 +02:00
#pragma once
#include <initializer_list>
2017-10-11 03:09:04 +02:00
#include <memory>
#include <unordered_map>
2017-10-11 03:09:04 +02:00
#include <vector>
2018-03-17 00:40:26 +01:00
#include <string>
2017-10-11 03:09:04 +02:00
#include <dxvk_adapter.h>
2017-10-11 15:31:36 +02:00
#include "dxgi_interfaces.h"
#include "dxgi_output.h"
2017-10-11 03:09:04 +02:00
namespace dxvk {
class DxgiFactory;
class DxgiOutput;
2018-03-28 19:06:00 +02:00
class DxgiAdapter : public DxgiObject<IDXGIVkAdapter> {
2017-10-11 03:09:04 +02:00
public:
DxgiAdapter(
DxgiFactory* factory,
const Rc<DxvkAdapter>& adapter);
~DxgiAdapter();
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;
2017-10-11 03:09:04 +02:00
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetParent(
REFIID riid,
void** ppParent) final;
2017-10-11 03:09:04 +02:00
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE CheckInterfaceSupport(
REFGUID InterfaceName,
LARGE_INTEGER* pUMDVersion) final;
2017-10-11 03:09:04 +02:00
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE EnumOutputs(
UINT Output,
IDXGIOutput** ppOutput) final;
2017-10-11 03:09:04 +02:00
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDesc(
DXGI_ADAPTER_DESC* pDesc) final;
2017-10-11 03:09:04 +02:00
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDesc1(
DXGI_ADAPTER_DESC1* pDesc) final;
2017-12-12 12:50:52 +01:00
Rc<DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() final;
2017-10-11 15:31:36 +02:00
HRESULT STDMETHODCALLTYPE CreateDevice(
IDXGIObject* pContainer,
const VkPhysicalDeviceFeatures* pFeatures,
IDXGIVkDevice** ppDevice) final;
DXGI_VK_FORMAT_INFO STDMETHODCALLTYPE LookupFormat(
DXGI_FORMAT Format,
DXGI_VK_FORMAT_MODE Mode) final;
HRESULT GetOutputFromMonitor(
HMONITOR Monitor,
IDXGIOutput** ppOutput);
HRESULT GetOutputData(
HMONITOR Monitor,
DXGI_VK_OUTPUT_DATA* pOutputData);
HRESULT SetOutputData(
HMONITOR Monitor,
const DXGI_VK_OUTPUT_DATA* pOutputData);
2017-10-11 03:09:04 +02:00
private:
using OutputMap = std::unordered_map<HMONITOR, DXGI_VK_OUTPUT_DATA>;
2017-10-11 15:31:36 +02:00
Com<DxgiFactory> m_factory;
Rc<DxvkAdapter> m_adapter;
2017-10-11 03:09:04 +02:00
std::mutex m_outputMutex;
OutputMap m_outputData;
2017-10-11 03:09:04 +02:00
};
}