libobs-d3d11: Store device adapter index (for rebuilding)

master
jp9000 2016-11-03 07:10:58 -07:00
parent 6d18ae39c5
commit e4900751c3
2 changed files with 3 additions and 0 deletions

View File

@ -205,6 +205,8 @@ void gs_device::InitDevice(uint32_t adapterIdx)
D3D_FEATURE_LEVEL levelUsed = D3D_FEATURE_LEVEL_9_3;
HRESULT hr = 0;
adpIdx = adapterIdx;
uint32_t createFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
#ifdef _DEBUG
//createFlags |= D3D11_CREATE_DEVICE_DEBUG;

View File

@ -625,6 +625,7 @@ struct gs_device {
ComPtr<IDXGIAdapter1> adapter;
ComPtr<ID3D11Device> device;
ComPtr<ID3D11DeviceContext> context;
uint32_t adpIdx = 0;
gs_texture_2d *curRenderTarget = nullptr;
gs_zstencil_buffer *curZStencilBuffer = nullptr;