2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2013-04-18 03:29:41 +00:00
|
|
|
// Refer to the license.txt file included.
|
2010-06-13 19:50:06 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-11-13 04:58:49 +00:00
|
|
|
#include <d3d11.h>
|
2017-09-03 06:33:47 +00:00
|
|
|
#include <d3d11_1.h>
|
2013-10-19 09:27:57 +00:00
|
|
|
#include <d3dcompiler.h>
|
2017-09-03 15:33:12 +00:00
|
|
|
#include <dxgi1_5.h>
|
2011-06-11 19:37:21 +00:00
|
|
|
#include <vector>
|
2019-03-09 13:31:36 +00:00
|
|
|
#include <wrl/client.h>
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "Common/Common.h"
|
2017-02-03 16:57:41 +00:00
|
|
|
#include "Common/CommonTypes.h"
|
2016-10-07 20:55:13 +00:00
|
|
|
#include "Common/MsgHandler.h"
|
2014-02-17 10:18:15 +00:00
|
|
|
|
2016-06-24 08:43:46 +00:00
|
|
|
#define CHECK(cond, Message, ...) \
|
|
|
|
if (!(cond)) \
|
|
|
|
{ \
|
2018-04-12 12:18:04 +00:00
|
|
|
PanicAlert("%s failed in %s at line %d: " Message, __func__, __FILE__, __LINE__, __VA_ARGS__); \
|
2016-06-24 08:43:46 +00:00
|
|
|
}
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2019-03-09 13:31:36 +00:00
|
|
|
namespace DX11
|
|
|
|
{
|
|
|
|
using Microsoft::WRL::ComPtr;
|
|
|
|
class SwapChain;
|
2011-01-29 20:16:51 +00:00
|
|
|
|
2010-06-13 19:50:06 +00:00
|
|
|
namespace D3D
|
|
|
|
{
|
2019-03-09 13:31:36 +00:00
|
|
|
extern ComPtr<IDXGIFactory2> dxgi_factory;
|
|
|
|
extern ComPtr<ID3D11Device> device;
|
|
|
|
extern ComPtr<ID3D11Device1> device1;
|
|
|
|
extern ComPtr<ID3D11DeviceContext> context;
|
|
|
|
extern D3D_FEATURE_LEVEL feature_level;
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2019-03-09 13:31:36 +00:00
|
|
|
bool Create(u32 adapter_index, bool enable_debug_layer);
|
|
|
|
void Destroy();
|
2010-06-13 19:50:06 +00:00
|
|
|
|
2019-03-09 13:31:36 +00:00
|
|
|
// Returns a list of supported AA modes for the current device.
|
|
|
|
std::vector<u32> GetAAModes(u32 adapter_index);
|
2015-02-09 12:14:45 +00:00
|
|
|
|
2019-04-28 05:26:46 +00:00
|
|
|
// Checks for support of the given texture format.
|
|
|
|
bool SupportsTextureFormat(DXGI_FORMAT format);
|
|
|
|
|
2013-10-19 09:27:57 +00:00
|
|
|
} // namespace D3D
|
2010-06-27 14:04:49 +00:00
|
|
|
|
2011-02-14 02:18:03 +00:00
|
|
|
} // namespace DX11
|