1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-09 22:46:08 +01:00
dxvk/src/d3d9/d3d9_adapter.h
Joshie 54ed8f0bb0 [d3d9] Implement Direct3D9 Frontend (#1275)
Co-authored-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Co-authored-by: Robin Kertels <robin.kertels@gmail.com>
Co-authored-by: pchome <pchome@users.noreply.github.com>
Co-authored-by: Christopher Egert <cme3000@gmail.com>
Co-authored-by: Derek Lesho <dereklesho52@Gmail.com>
Co-authored-by: Luis Cáceres <lacaceres97@gmail.com>
Co-authored-by: Nelson Chen <crazysim@gmail.com>
Co-authored-by: Edmondo Tommasina <edmondo.tommasina@gmail.com>
Co-authored-by: Riesi <riesi@opentrash.com>
Co-authored-by: gbMichelle <gbmichelle.dev@gmail.com>
2019-12-16 04:28:01 +01:00

112 lines
2.8 KiB
C++

#pragma once
#include "d3d9_include.h"
#include "d3d9_options.h"
#include "d3d9_format.h"
#include "../dxvk/dxvk_adapter.h"
namespace dxvk {
class D3D9InterfaceEx;
class D3D9Adapter {
public:
D3D9Adapter(
D3D9InterfaceEx* pParent,
Rc<DxvkAdapter> Adapter,
UINT Ordinal);
HRESULT GetAdapterIdentifier(
DWORD Flags,
D3DADAPTER_IDENTIFIER9* pIdentifier);
HRESULT CheckDeviceType(
D3DDEVTYPE DevType,
D3D9Format AdapterFormat,
D3D9Format BackBufferFormat,
BOOL bWindowed);
HRESULT CheckDeviceFormat(
D3DDEVTYPE DeviceType,
D3D9Format AdapterFormat,
DWORD Usage,
D3DRESOURCETYPE RType,
D3D9Format CheckFormat);
HRESULT CheckDeviceMultiSampleType(
D3DDEVTYPE DeviceType,
D3D9Format SurfaceFormat,
BOOL Windowed,
D3DMULTISAMPLE_TYPE MultiSampleType,
DWORD* pQualityLevels);
HRESULT CheckDepthStencilMatch(
D3DDEVTYPE DeviceType,
D3D9Format AdapterFormat,
D3D9Format RenderTargetFormat,
D3D9Format DepthStencilFormat);
HRESULT CheckDeviceFormatConversion(
D3DDEVTYPE DeviceType,
D3D9Format SourceFormat,
D3D9Format TargetFormat);
HRESULT GetDeviceCaps(
D3DDEVTYPE DeviceType,
D3DCAPS9* pCaps);
HMONITOR GetMonitor();
UINT GetAdapterModeCountEx(CONST D3DDISPLAYMODEFILTER* pFilter);
HRESULT EnumAdapterModesEx(
const D3DDISPLAYMODEFILTER* pFilter,
UINT Mode,
D3DDISPLAYMODEEX* pMode);
HRESULT GetAdapterDisplayModeEx(
D3DDISPLAYMODEEX* pMode,
D3DDISPLAYROTATION* pRotation);
HRESULT GetAdapterLUID(LUID* pLUID);
UINT GetOrdinal() { return m_ordinal; }
Rc<DxvkAdapter> GetDXVKAdapter() { return m_adapter; }
D3D9_VK_FORMAT_MAPPING GetFormatMapping(
D3D9Format Format) const {
return m_d3d9Formats.GetFormatMapping(Format);
}
DxvkFormatInfo GetUnsupportedFormatInfo(
D3D9Format Format) const {
return m_d3d9Formats.GetUnsupportedFormatInfo(Format);
}
private:
HRESULT CheckDeviceVkFormat(
VkFormat Format,
DWORD Usage,
D3DRESOURCETYPE RType);
void CacheModes(D3D9Format Format);
D3D9InterfaceEx* m_parent;
Rc<DxvkAdapter> m_adapter;
UINT m_ordinal;
std::vector<D3DDISPLAYMODEEX> m_modes;
D3D9Format m_modeCacheFormat;
const D3D9VkFormatTable m_d3d9Formats;
};
}