Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions impeller/renderer/backend/vulkan/context_vk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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 {
Expand Down