facebook/igl

Vulkan device creation fmt error

Closed this issue · 1 comments

Not passing in a vulkan device's debug name (or passing in a nullptr, or leaving it out) results in an fmt format error.

auto device = igl::vulkan::HWDevice::create(std::move(ctx), devices[0], 800, 600);

leads to

terminate called after throwing an instance of 'fmt::v10::format_error' what(): string pointer is null Aborted (core dumped)

This works:

auto device = igl::vulkan::HWDevice::create(std::move(ctx), devices[0], 800, 600, 0, nullptr, nullptr, "foo");

Offending line in VulkanContext::initContext:

device_ = std::make_unique<igl::vulkan::VulkanDevice>(vf_, device, IGL_FORMAT("Device: VulkanContext::device_ {}", debugName).c_str());