Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit f0d3ec3

Browse files
authored
[Impeller] Fallback to graphics queue is transfer queue is not available. (#40787)
[Impeller] Fallback to graphics queue is transfer queue is not available
1 parent 3a0d54e commit f0d3ec3

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

impeller/renderer/backend/vulkan/context_vk.cc

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void ContextVK::Setup(Settings settings) {
177177

178178
auto instance = vk::createInstanceUnique(instance_info);
179179
if (instance.result != vk::Result::eSuccess) {
180-
VALIDATION_LOG << "Could not create instance: "
180+
VALIDATION_LOG << "Could not create Vulkan instance: "
181181
<< vk::to_string(instance.result);
182182
return;
183183
}
@@ -217,9 +217,16 @@ void ContextVK::Setup(Settings settings) {
217217
auto compute_queue =
218218
PickQueue(physical_device.value(), vk::QueueFlagBits::eCompute);
219219

220-
if (!graphics_queue.has_value() || !transfer_queue.has_value() ||
221-
!compute_queue.has_value()) {
222-
VALIDATION_LOG << "Could not pick device queues.";
220+
if (!graphics_queue.has_value()) {
221+
VALIDATION_LOG << "Could not pick graphics queue.";
222+
return;
223+
}
224+
if (!transfer_queue.has_value()) {
225+
FML_LOG(INFO) << "Dedicated transfer queue not avialable.";
226+
transfer_queue = graphics_queue.value();
227+
}
228+
if (!compute_queue.has_value()) {
229+
VALIDATION_LOG << "Could not pick compute queue.";
223230
return;
224231
}
225232

@@ -355,7 +362,9 @@ void ContextVK::Setup(Settings settings) {
355362
SetDebugName(device_.get(), device_.get(), "ImpellerDevice");
356363
SetDebugName(device_.get(), graphics_queue_, "ImpellerGraphicsQ");
357364
SetDebugName(device_.get(), compute_queue_, "ImpellerComputeQ");
358-
SetDebugName(device_.get(), transfer_queue_, "ImpellerTransferQ");
365+
if (transfer_queue_ != graphics_queue_) {
366+
SetDebugName(device_.get(), transfer_queue_, "ImpellerTransferQ");
367+
}
359368
}
360369

361370
bool ContextVK::IsValid() const {

0 commit comments

Comments
 (0)