Skip to content

vulkan/log: Be a bit more flexible with slightly invalid usage

Faith Ekstrand requested to merge gfxstrand/mesa:vulkan/log-crash-less into main

Most of the time when the logging code is invoked, it means we're already in an edge case. It should be as robust as possible, otherwise we risk making hard to debug things even harder. To that end, instead of blowing up if passed a NULL object on the list, handle it as gracefully as we can.

This bit me hard when trying to debug subtle failures in !13184 (merged) which were caused by the logging code getting invoked for the incomplete pipelines case when the pipeline cache was NULL. This is exactly the kind of case where you want to just log and keep going. Sure, it'd be nice to track down that problem, but segfaulting in the logging code on an obscure cache miss is a recipe for serious CI flakes.

Merge request reports