Fixed CustomQueueDescription lacking a constructor

This commit is contained in:
Charles Giessen 2020-02-17 13:29:22 -07:00
parent 4a4078d276
commit bb4a752d2d
2 changed files with 7 additions and 3 deletions

View File

@ -769,18 +769,20 @@ detail::Expected<Device, detail::Error<DeviceError>> DeviceBuilder::build () {
if (queue_descriptions.size () == 0) { if (queue_descriptions.size () == 0) {
int graphics = get_graphics_queue_index (info.queue_families); int graphics = get_graphics_queue_index (info.queue_families);
if (graphics >= 0) { if (graphics >= 0) {
queue_descriptions.push_back ({ static_cast<uint32_t> (graphics), 1, { 1.0f } }); queue_descriptions.push_back ({ static_cast<uint32_t> (graphics), 1, std::vector<float>{ 1.0f } });
} }
if (info.request_compute_queue) { if (info.request_compute_queue) {
int compute = get_distinct_compute_queue_index (info.queue_families); int compute = get_distinct_compute_queue_index (info.queue_families);
if (compute >= 0) { if (compute >= 0) {
queue_descriptions.push_back ({ static_cast<uint32_t> (compute), 1, { 1.0f } }); queue_descriptions.push_back (
{ static_cast<uint32_t> (compute), 1, std::vector<float>{ 1.0f } });
} }
} }
if (info.request_transfer_queue) { if (info.request_transfer_queue) {
int transfer = get_distinct_transfer_queue_index (info.queue_families); int transfer = get_distinct_transfer_queue_index (info.queue_families);
if (transfer >= 0) { if (transfer >= 0) {
queue_descriptions.push_back ({ static_cast<uint32_t> (transfer), 1, { 1.0f } }); queue_descriptions.push_back (
{ static_cast<uint32_t> (transfer), 1, std::vector<float>{ 1.0f } });
} }
} }
} }

View File

@ -319,6 +319,8 @@ struct Device {
void destroy_device (Device device); void destroy_device (Device device);
struct CustomQueueDescription { struct CustomQueueDescription {
CustomQueueDescription (uint32_t index, uint32_t count, std::vector<float> priorities)
: index (index), count (count), priorities (priorities) {}
uint32_t index = 0; uint32_t index = 0;
uint32_t count = 0; uint32_t count = 0;
std::vector<float> priorities; std::vector<float> priorities;