formatting
This commit is contained in:
parent
2237762d06
commit
1738c3e1f0
@ -543,6 +543,7 @@ INTERNAL void dx12_init_device(void)
|
|||||||
struct string error = LIT("Could not initialize GPU device.");
|
struct string error = LIT("Could not initialize GPU device.");
|
||||||
struct string first_gpu_name = ZI;
|
struct string first_gpu_name = ZI;
|
||||||
u32 adapter_index = 0;
|
u32 adapter_index = 0;
|
||||||
|
b32 skip = 0; /* For debugging iGPU */
|
||||||
for (;;) {
|
for (;;) {
|
||||||
{
|
{
|
||||||
hr = IDXGIFactory6_EnumAdapterByGpuPreference(G.factory, adapter_index, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, &IID_IDXGIAdapter1, (void **)&adapter);
|
hr = IDXGIFactory6_EnumAdapterByGpuPreference(G.factory, adapter_index, DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE, &IID_IDXGIAdapter1, (void **)&adapter);
|
||||||
@ -556,9 +557,10 @@ INTERNAL void dx12_init_device(void)
|
|||||||
{
|
{
|
||||||
hr = D3D12CreateDevice((IUnknown *)adapter, D3D_FEATURE_LEVEL_12_0, &IID_ID3D12Device, (void **)&device);
|
hr = D3D12CreateDevice((IUnknown *)adapter, D3D_FEATURE_LEVEL_12_0, &IID_ID3D12Device, (void **)&device);
|
||||||
}
|
}
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr) && !skip ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
skip = 0;
|
||||||
ID3D12Device_Release(device);
|
ID3D12Device_Release(device);
|
||||||
IDXGIAdapter1_Release(adapter);
|
IDXGIAdapter1_Release(adapter);
|
||||||
adapter = 0;
|
adapter = 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user