Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
adapter.h
1 #pragma once
2 
3 #include "renderer/d3d12_includes.h"
4 #include "util/string.h"
5 #include "util/vector.h"
6 
7 namespace blowbox
8 {
16  {
17  FindAdapterFlag_NO_SOFTWARE = 0x1,
18  FindAdapterFlag_NO_INTEL = 0x2
19  };
20 
27  struct Adapter
28  {
30  Adapter();
31 
36  Adapter(IDXGIAdapter1* dxgi_adapter);
37 
38  IDXGIAdapter4* dxgi_adapter;
40  DXGI_ADAPTER_FLAG3 flags;
41  unsigned long long video_memory;
42  unsigned long long system_memory;
43  unsigned long long shared_system_memory;
44  LUID adapter_luid;
45 
51  static Vector<Adapter> FindAvailableAdapters(FindAdapterFlag find_adapter_flags);
52  };
53 }
Wraps an IDXGIAdapter.
Definition: adapter.h:27
eastl::vector< T > Vector
Typedef for wrapping the EASTL vector.
Definition: vector.h:14
static Vector< Adapter > FindAvailableAdapters(FindAdapterFlag find_adapter_flags)
Find a list of available adapters.
Definition: adapter.cc:35
Adapter()
Constructs an empty Adapter.
Definition: adapter.cc:9
FindAdapterFlag
Flags that are provided to Adapter::FindAvailableAdapters()
Definition: adapter.h:15
String name
The name of this Adapter.
Definition: adapter.h:39
LUID adapter_luid
The LUID of this Adapter.
Definition: adapter.h:44
eastl::string String
Typedef for wrapping the EASTL string.
Definition: string.h:13
unsigned long long system_memory
How much system memory is available on this Adapter.
Definition: adapter.h:42
unsigned long long shared_system_memory
How much shared system memory is available on this Adapter.
Definition: adapter.h:43
unsigned long long video_memory
How much video memory is available on this Adapter.
Definition: adapter.h:41
The main Blowbox namespace.
Definition: image.cc:8
DXGI_ADAPTER_FLAG3 flags
Any flags that are set on the Adapter.
Definition: adapter.h:40
IDXGIAdapter4 * dxgi_adapter
The underlying IDXGIAdapter.
Definition: adapter.h:38