[D3D12] Rename d3d12_adapter_index to d3d12_adapter

This commit is contained in:
Triang3l 2018-11-26 08:03:16 +03:00
parent f3d34c1d88
commit d5f7d96be9
1 changed files with 4 additions and 4 deletions

View File

@ -15,7 +15,7 @@
#include "xenia/ui/d3d12/d3d12_context.h" #include "xenia/ui/d3d12/d3d12_context.h"
DEFINE_bool(d3d12_debug, false, "Enable Direct3D 12 and DXGI debug layer."); DEFINE_bool(d3d12_debug, false, "Enable Direct3D 12 and DXGI debug layer.");
DEFINE_int32(d3d12_adapter_index, -1, DEFINE_int32(d3d12_adapter, -1,
"Index of the DXGI adapter to use. " "Index of the DXGI adapter to use. "
"-1 for any physical adapter, -2 for WARP software rendering."); "-1 for any physical adapter, -2 for WARP software rendering.");
@ -134,11 +134,11 @@ D3D12Provider::InitializationResult D3D12Provider::Initialize() {
if (SUCCEEDED(adapter->GetDesc1(&adapter_desc))) { if (SUCCEEDED(adapter->GetDesc1(&adapter_desc))) {
if (SUCCEEDED(pfn_d3d12_create_device_(adapter, D3D_FEATURE_LEVEL_11_0, if (SUCCEEDED(pfn_d3d12_create_device_(adapter, D3D_FEATURE_LEVEL_11_0,
_uuidof(ID3D12Device), nullptr))) { _uuidof(ID3D12Device), nullptr))) {
if (FLAGS_d3d12_adapter_index >= 0) { if (FLAGS_d3d12_adapter >= 0) {
if (adapter_index == FLAGS_d3d12_adapter_index) { if (adapter_index == FLAGS_d3d12_adapter) {
break; break;
} }
} else if (FLAGS_d3d12_adapter_index == -2) { } else if (FLAGS_d3d12_adapter == -2) {
if (adapter_desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) { if (adapter_desc.Flags & DXGI_ADAPTER_FLAG_SOFTWARE) {
break; break;
} }