dolphin/Source/Core/VideoBackends/D3D/D3DBase.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.4 KiB
C
Raw Normal View History

// Copyright 2010 Dolphin Emulator Project
2015-05-17 23:08:10 +00:00
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
#include <d3d11.h>
2017-09-03 06:33:47 +00:00
#include <d3d11_1.h>
#include <d3dcompiler.h>
#include <dxgi1_5.h>
#include <vector>
2019-03-09 13:31:36 +00:00
#include <wrl/client.h>
#include "Common/Common.h"
2017-02-03 16:57:41 +00:00
#include "Common/CommonTypes.h"
#include "Common/MsgHandler.h"
#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__); \
}
2019-03-09 13:31:36 +00:00
namespace DX11
{
using Microsoft::WRL::ComPtr;
class SwapChain;
namespace D3D
{
extern ComPtr<IDXGIFactory> dxgi_factory;
2019-03-09 13:31:36 +00:00
extern ComPtr<ID3D11Device> device;
extern ComPtr<ID3D11Device1> device1;
extern ComPtr<ID3D11DeviceContext> context;
extern D3D_FEATURE_LEVEL feature_level;
2019-03-09 13:31:36 +00:00
bool Create(u32 adapter_index, bool enable_debug_layer);
void Destroy();
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);
// Checks for support of the given texture format.
bool SupportsTextureFormat(DXGI_FORMAT format);
// Checks for logic op support.
bool SupportsLogicOp(u32 adapter_index);
} // namespace D3D
} // namespace DX11