2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2010 Dolphin Emulator Project
|
2021-07-05 03:22:19 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
2010-06-13 21:50:06 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2013-11-13 05:58:49 +01:00
|
|
|
#include <d3d11.h>
|
2017-09-03 08:33:47 +02:00
|
|
|
#include <d3d11_1.h>
|
2013-10-19 11:27:57 +02:00
|
|
|
#include <d3dcompiler.h>
|
2017-09-03 17:33:12 +02:00
|
|
|
#include <dxgi1_5.h>
|
2011-06-11 21:37:21 +02:00
|
|
|
#include <vector>
|
2019-03-09 14:31:36 +01:00
|
|
|
#include <wrl/client.h>
|
2010-06-13 21:50:06 +02:00
|
|
|
|
2014-02-17 11:18:15 +01:00
|
|
|
#include "Common/Common.h"
|
2017-02-03 17:57:41 +01:00
|
|
|
#include "Common/CommonTypes.h"
|
2016-10-07 22:55:13 +02:00
|
|
|
#include "Common/MsgHandler.h"
|
2014-02-17 11:18:15 +01:00
|
|
|
|
2019-03-09 14:31:36 +01:00
|
|
|
namespace DX11
|
|
|
|
{
|
|
|
|
using Microsoft::WRL::ComPtr;
|
|
|
|
class SwapChain;
|
2011-01-29 21:16:51 +01:00
|
|
|
|
2010-06-13 21:50:06 +02:00
|
|
|
namespace D3D
|
|
|
|
{
|
2019-05-12 06:42:16 +02:00
|
|
|
extern ComPtr<IDXGIFactory> dxgi_factory;
|
2019-03-09 14:31:36 +01:00
|
|
|
extern ComPtr<ID3D11Device> device;
|
|
|
|
extern ComPtr<ID3D11Device1> device1;
|
|
|
|
extern ComPtr<ID3D11DeviceContext> context;
|
|
|
|
extern D3D_FEATURE_LEVEL feature_level;
|
2010-06-13 21:50:06 +02:00
|
|
|
|
2019-03-09 14:31:36 +01:00
|
|
|
bool Create(u32 adapter_index, bool enable_debug_layer);
|
|
|
|
void Destroy();
|
2010-06-13 21:50:06 +02:00
|
|
|
|
2019-03-09 14:31:36 +01:00
|
|
|
// Returns a list of supported AA modes for the current device.
|
|
|
|
std::vector<u32> GetAAModes(u32 adapter_index);
|
2015-02-09 13:14:45 +01:00
|
|
|
|
2019-04-28 07:26:46 +02:00
|
|
|
// Checks for support of the given texture format.
|
|
|
|
bool SupportsTextureFormat(DXGI_FORMAT format);
|
|
|
|
|
2019-07-21 17:10:51 +02:00
|
|
|
// Checks for logic op support.
|
|
|
|
bool SupportsLogicOp(u32 adapter_index);
|
|
|
|
|
2013-10-19 11:27:57 +02:00
|
|
|
} // namespace D3D
|
2010-06-27 16:04:49 +02:00
|
|
|
|
2011-02-14 03:18:03 +01:00
|
|
|
} // namespace DX11
|