Skip to content
Snippets Groups Projects
Unverified Commit 064804bd authored by Ryan's avatar Ryan Committed by GitHub
Browse files

Fix Disabling AMD GPUs

The AMD jconf.cpp would only accept an array. The config sample, and the nvidia and cpu config work with the value 'null', as they accept a 'kNullType'. This means at current, AMD GPUs could not be turned off, the config file wouldn't parse on load.

This change makes AMD consistent with the others, and can now be disabled.
parent a8e83eec
No related branches found
No related tags found
No related merge requests found
......@@ -56,9 +56,10 @@ struct configVal {
Type iType;
};
//Same order as in configEnum, as per comment above
// Same order as in configEnum, as per comment above
// kNullType means any type
configVal oConfigValues[] = {
{ aGpuThreadsConf, "gpu_threads_conf", kArrayType },
{ aGpuThreadsConf, "gpu_threads_conf", kNullType },
{ iPlatformIdx, "platform_index", kNumberType }
};
......@@ -68,6 +69,8 @@ inline bool checkType(Type have, Type want)
{
if(want == have)
return true;
else if(want == kNullType)
return true;
else if(want == kTrueType && have == kFalseType)
return true;
else if(want == kFalseType && have == kTrueType)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment