Updated formatting
Signed-off-by: Alejandro Saucedo <axsauze@gmail.com>
This commit is contained in:
parent
5308141d0e
commit
797ba87c2a
12 changed files with 161 additions and 112 deletions
|
|
@ -288,22 +288,22 @@ Manager::createDevice(const std::vector<uint32_t>& familyQueueIndices,
|
|||
}
|
||||
|
||||
this->mFreeDevice = true;
|
||||
|
||||
|
||||
// Getting an integer that says how many vuklan devices we have
|
||||
uint32_t deviceCount = 0;
|
||||
this->mInstance->enumeratePhysicalDevices(&deviceCount, nullptr);
|
||||
|
||||
|
||||
// This means there are no devices at all
|
||||
if (deviceCount == 0) {
|
||||
throw std::runtime_error("Failed to find GPUs with Vulkan support! "
|
||||
"Maybe you haven't installed vulkan drivers?");
|
||||
}
|
||||
|
||||
|
||||
// This means that we're exceeding our device limit, for
|
||||
// example if we have 2 devices, just physicalDeviceIndex
|
||||
// 0 and 1 are acceptable. Hence, physicalDeviceIndex should
|
||||
// always be less than deviceCount, else we raise an error
|
||||
if ( !(deviceCount > physicalDeviceIndex) ) {
|
||||
if (!(deviceCount > physicalDeviceIndex)) {
|
||||
throw std::runtime_error("There is no such physical index or device, "
|
||||
"please use your existing device");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue