Skip to content

v3dv/pipeline: ensure vk_graphics_pipeline_all_state alive when still needed

What does this MR do and why?

v3dv/pipeline: ensure vk_graphics_pipeline_all_state alive when still needed

Right now we have a statically allocated vk_graphics_pipeline_state,
that we declare at pipeline_init, and fill at
pipeline_init_dynamic_state. This one can be static as right now it is
only needed during pipeline_init lifetime.

But to fill it, we need a vk_graphics_pipeline_all_state structure,
that right now we declare at pipeline_init_dynamic_state. But that one
become part of that vk_graphics_pipeline_state, so still needed at
pipeline_init.

This was detected when trying to refactor the code to use the
pipeline_state later on, but it raises an "invalid read" error using
valgrind with the current code. It is surprising that didn't cause any
problem.

Fixes: f2236065b70 ("v3dv: port dynamic state tracking to use Mesa Vulkan")
Cc: mesa-stable

Merge request reports