Skip to content
Snippets Groups Projects
Commit e2ecc5a7 authored by Alexander Gauggel's avatar Alexander Gauggel
Browse files

Merge branch '61-queuesIntelGraphicsAdaption' into 'develop'

Resolve "Queues-Abfragen anpassen für Intel HD Graphics"

Closes #61

See merge request !46
parents c5ea5767 bd052c27
No related branches found
No related tags found
1 merge request!46Resolve "Queues-Abfragen anpassen für Intel HD Graphics"
Pipeline #25480 passed
......@@ -23,7 +23,7 @@ int main(int argc, const char** argv) {
window,
applicationName,
VK_MAKE_VERSION(0, 0, 1),
{ vk::QueueFlagBits::eTransfer,vk::QueueFlagBits::eGraphics, vk::QueueFlagBits::eCompute },
{ vk::QueueFlagBits::eGraphics ,vk::QueueFlagBits::eCompute , vk::QueueFlagBits::eTransfer },
{},
{ "VK_KHR_swapchain" }
);
......
#include <limits>
#include <unordered_set>
#include <iostream>
#include "vkcv/QueueManager.hpp"
#include "vkcv/QueueManager.hpp"
namespace vkcv {
......@@ -89,7 +89,13 @@ namespace vkcv {
}
}
if (!found) {
throw std::runtime_error("Too many graphics queues were requested than being available!");
for (int i = 0; i < queueFamilyStatus.size() && !found; i++) {
if (initialQueueFamilyStatus[i][0] > 0) {
queuePairsGraphics.push_back(std::pair(i, 0));
found = true;
}
}
std::cerr << "Warning: not enough \"" << vk::to_string(qFlag) << "\"-Queues." << std::endl;
}
break;
case vk::QueueFlagBits::eCompute:
......@@ -104,7 +110,13 @@ namespace vkcv {
}
}
if (!found) {
throw std::runtime_error("Too many compute queues were requested than being available!");
for (int i = 0; i < queueFamilyStatus.size() && !found; i++) {
if (initialQueueFamilyStatus[i][1] > 0) {
queuePairsCompute.push_back(std::pair(i, 0));
found = true;
}
}
std::cerr << "Warning: not enough \"" << vk::to_string(qFlag) << "\"-Queues." << std::endl;
}
break;
case vk::QueueFlagBits::eTransfer:
......@@ -119,7 +131,13 @@ namespace vkcv {
}
}
if (!found) {
throw std::runtime_error("Too many transfer queues were requested than being available!");
for (int i = 0; i < queueFamilyStatus.size() && !found; i++) {
if (initialQueueFamilyStatus[i][2] > 0) {
queuePairsTransfer.push_back(std::pair(i, 0));
found = true;
}
}
std::cerr << "Warning: not enough \"" << vk::to_string(qFlag) << "\"-Queues." << std::endl;
}
break;
default:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment