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

80 lines
1.8 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>
#include <dxvk_adapter.h>
2017-10-11 15:31:36 +02:00
#include "dxgi_interfaces.h"
2017-10-11 03:09:04 +02:00
#include "dxgi_object.h"
namespace dxvk {
class DxgiFactory;
class DxgiOutput;
2017-11-27 15:51:53 +01:00
class DxgiAdapter : public DxgiObject<IDXGIAdapterPrivate> {
2017-10-11 03:09:04 +02:00
public:
DxgiAdapter(
DxgiFactory* factory,
const Rc<DxvkAdapter>& adapter);
~DxgiAdapter();
HRESULT QueryInterface(
REFIID riid,
void **ppvObject) final;
HRESULT GetParent(
REFIID riid,
void **ppParent) final;
HRESULT CheckInterfaceSupport(
REFGUID InterfaceName,
LARGE_INTEGER *pUMDVersion) final;
HRESULT EnumOutputs(
UINT Output,
IDXGIOutput **ppOutput) final;
HRESULT GetDesc(
DXGI_ADAPTER_DESC *pDesc) final;
HRESULT GetDesc1(
DXGI_ADAPTER_DESC1 *pDesc) final;
2017-10-11 15:31:36 +02:00
Rc<DxvkAdapter> GetDXVKAdapter() final;
DxgiFormatPair LookupFormat(
DXGI_FORMAT format) final;
2017-10-11 03:09:04 +02:00
private:
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::unordered_map<DXGI_FORMAT, DxgiFormatPair> m_formats;
2017-12-09 14:41:37 +01:00
void AddFormat(
DXGI_FORMAT srcFormat,
VkFormat dstFormat);
void AddFormat(
DXGI_FORMAT srcFormat,
VkFormat dstFormat,
const std::initializer_list<VkFormat>& fallbacks,
VkFormatFeatureFlags features);
void SetupFormatTable();
bool HasFormatSupport(
VkFormat format,
VkFormatFeatureFlags features) const;
2017-10-11 03:09:04 +02:00
};
}