| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#pragma once |
| 5 |
|
| 6 |
#include <d3dcompiler.h> |
| 7 |
#include <dxgiformat.h> |
| 8 |
#include <string> |
| 9 |
#include <vector> |
| 10 |
#include <wrl/client.h> |
| 11 |
|
| 12 |
#include "Common/CommonTypes.h" |
| 13 |
|
| 14 |
struct IDXGIFactory; |
| 15 |
|
| 16 |
enum class AbstractTextureFormat : u32; |
| 17 |
|
| 18 |
namespace D3DCommon |
| 19 |
{ |
| 20 |
|
| 21 |
bool LoadLibraries(); |
| 22 |
void UnloadLibraries(); |
| 23 |
|
| 24 |
|
| 25 |
std::vector<std::string> GetAdapterNames(); |
| 26 |
|
| 27 |
|
| 28 |
Microsoft::WRL::ComPtr<IDXGIFactory> CreateDXGIFactory(bool debug_device); |
| 29 |
|
| 30 |
|
| 31 |
extern pD3DCompile d3d_compile; |
| 32 |
|
| 33 |
|
| 34 |
DXGI_FORMAT GetDXGIFormatForAbstractFormat(AbstractTextureFormat format, bool typeless); |
| 35 |
DXGI_FORMAT GetSRVFormatForAbstractFormat(AbstractTextureFormat format); |
| 36 |
DXGI_FORMAT GetRTVFormatForAbstractFormat(AbstractTextureFormat format, bool integer); |
| 37 |
DXGI_FORMAT GetDSVFormatForAbstractFormat(AbstractTextureFormat format); |
| 38 |
AbstractTextureFormat GetAbstractFormatForDXGIFormat(DXGI_FORMAT format); |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
void SetDebugObjectName(IUnknown* resource, std::string_view name); |
| 44 |
} |