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