[Impeller] Fallback to graphics queue is transfer queue is not available. (flutter/engine#40787)
[Impeller] Fallback to graphics queue is transfer queue is not available
This commit is contained in:
@@ -177,7 +177,7 @@ void ContextVK::Setup(Settings settings) {
|
||||
|
||||
auto instance = vk::createInstanceUnique(instance_info);
|
||||
if (instance.result != vk::Result::eSuccess) {
|
||||
VALIDATION_LOG << "Could not create instance: "
|
||||
VALIDATION_LOG << "Could not create Vulkan instance: "
|
||||
<< vk::to_string(instance.result);
|
||||
return;
|
||||
}
|
||||
@@ -217,9 +217,16 @@ void ContextVK::Setup(Settings settings) {
|
||||
auto compute_queue =
|
||||
PickQueue(physical_device.value(), vk::QueueFlagBits::eCompute);
|
||||
|
||||
if (!graphics_queue.has_value() || !transfer_queue.has_value() ||
|
||||
!compute_queue.has_value()) {
|
||||
VALIDATION_LOG << "Could not pick device queues.";
|
||||
if (!graphics_queue.has_value()) {
|
||||
VALIDATION_LOG << "Could not pick graphics queue.";
|
||||
return;
|
||||
}
|
||||
if (!transfer_queue.has_value()) {
|
||||
FML_LOG(INFO) << "Dedicated transfer queue not avialable.";
|
||||
transfer_queue = graphics_queue.value();
|
||||
}
|
||||
if (!compute_queue.has_value()) {
|
||||
VALIDATION_LOG << "Could not pick compute queue.";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -355,7 +362,9 @@ void ContextVK::Setup(Settings settings) {
|
||||
SetDebugName(device_.get(), device_.get(), "ImpellerDevice");
|
||||
SetDebugName(device_.get(), graphics_queue_, "ImpellerGraphicsQ");
|
||||
SetDebugName(device_.get(), compute_queue_, "ImpellerComputeQ");
|
||||
SetDebugName(device_.get(), transfer_queue_, "ImpellerTransferQ");
|
||||
if (transfer_queue_ != graphics_queue_) {
|
||||
SetDebugName(device_.get(), transfer_queue_, "ImpellerTransferQ");
|
||||
}
|
||||
}
|
||||
|
||||
bool ContextVK::IsValid() const {
|
||||
|
||||
Reference in New Issue
Block a user