Fix a bug found by Piers with regards to vkEnumeratePhysicalDevices.
Basically, if the application called the function without first
calling it with NULL pPhysicalDevices, the count would be wrong.
Change-Id: If3a4ba60b17c64df2133d31d3692ee6da21c6a01
goto out;
}
- if (pPhysicalDevices == NULL) {
+ if (NULL == pPhysicalDevices || 0 == inst->total_gpu_count) {
// Call down. At the lower levels, this will setup the terminator
// structures in the loader.
res = disp->EnumeratePhysicalDevices(instance, pPhysicalDeviceCount,
"vkEnumeratePhysicalDevices: Failed in dispatch call"
" used to determine number of available GPUs");
}
+ }
+ if (NULL == pPhysicalDevices) {
// Goto out, even on success since we don't need to fill in the rest.
goto out;
}