Skip to content

lavapipe: handle null-buffers for xfb

Erik Faye-Lund requested to merge kusma/mesa:lvp-fix-xfb-null-buffers into master

The Vulkan spec says the following for vkCmdBeginTransformFeedbackEXT:

"For each element of pCounterBuffers that is VK_NULL_HANDLE, transform feedback will start capturing vertex data to byte zero in the corresponding bound transform feedback buffer."

While not quite as explicit, similar wording exists for vkCmdEndTransformFeedbackEXT in "Valid Usage" section.

So, this means that we should handle NULL in this case, and simply ignore the corresponding reads and writes.

This fixes a whole lot of crashes when using transform-feedback with Zink.

Merge request reports