Skip to content

Commit

Permalink
Allowed to launch the game without Nvidia and AMD graphic adapter (th…
Browse files Browse the repository at this point in the history
…ere's Intel, you know)

Removed constant double GPU rendering
GetATIGpuNum() will return 0 if initialization failed
  • Loading branch information
Xottab-DUTY committed May 26, 2018
1 parent b5b2b75 commit 614c467
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/Layers/xrRender/HWCaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ u32 GetNVGpuNum()
}

if (iGpuNum > 1)
{
Msg("* NVidia MGPU: %d-Way SLI detected.", iGpuNum);
}

return iGpuNum;
}
Expand All @@ -75,8 +73,8 @@ u32 GetATIGpuNum()
AGSReturnCode status = agsInit(&ags, &gpuInfo);
if (status != AGS_SUCCESS)
{
Msg("! AGS: Initialization failed (%d)", status);
return 1;
Msg("* AGS: Initialization failed (%d)", status);
return 0;
}
int crossfireGpuCount = 1;
status = agsGetCrossfireGPUCount(ags, &crossfireGpuCount);
Expand All @@ -94,16 +92,14 @@ u32 GetATIGpuNum()
u32 GetGpuNum()
{
u32 res = GetNVGpuNum();

res = _max(res, GetATIGpuNum());

res = _max(res, 2);

res = _min(res, CHWCaps::MAX_GPUS);

// It's vital to have at least one GPU, else
// code will fail.
VERIFY(res > 0);
if (res == 0)
{
Log("! Cannot find graphic adapter. Assuming that you have one...");
res = 1;
}

Msg("* Starting rendering as %d-GPU.", res);

Expand Down

0 comments on commit 614c467

Please sign in to comment.