Skip to content

Draft: ext_external_objects/vk framework: fix for cleanup

This is a hackish way to fix a segmentation fault happening at exit, when validation layers are enabled. The problem is caused from validation layers looking up the vulkan objects in a global hash table. This hash table gets destroyed before cleanup runs. As piglit uses its own "atexit" function to destroy gl_fw when the ESC key is pressed, adding support for some sort of cleanup callback in config (similar to piglit_init) that would be optionally called before exit would involve too many changes in the GL framework.

To avoid modifying piglit for validation layers to not segfault, a check if validation layers are enabled was added in vk_cleanup_ctx. When layers are enabled we clean only the allocated objects and not the command buffer, the pool, the instance and the device. When they aren't we cleanup everything.

Signed-off-by: Eleni Maria Stea elene.mst@gmail.com

Edited by Eleni Maria Stea

Merge request reports

Loading