Skip to content

iris: Reference the shader variant for last_vue_map as well

Kenneth Graunke requested to merge kwg/mesa:iris-vue-map-ref into master

We call update_last_vue_map after updating the shaders, which compares the new and old VUE maps. Except...updating the shaders may have dropped the last reference to the variant that ice->shaders.last_vue_map belonged to, leading to a classic use-after-free.

Fix this by taking a reference to the variant for the last VUE stage, so it stays around until we're done with it.

Fixes: 1afed514 ("iris: Store a list of shader variants in the shader itself") Closes: #4311 (closed)

Merge request reports