zink: prevent crash when freeing
authorantonino <antonino.maniscalco@collabora.com>
Wed, 22 Feb 2023 16:24:57 +0000 (17:24 +0100)
committerMarge Bot <emma+marge@anholt.net>
Wed, 29 Mar 2023 19:18:40 +0000 (19:18 +0000)
commitd786f52f1ff10fba42e87530933a2a4c68de49a8
tree42b235fb726726d202de0f8b82632fc8e7519136
parent2748301a09dc2d5c9e31366bbc42335e49b56750
zink: prevent crash when freeing

If the same vertex shader is used for more than one pipeline where for some a gs
is generated but not for others then the logic to free pipeline
libraries might use the incorrect stage_mask and try to free a non
existing gs.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21238>
src/gallium/drivers/zink/zink_compiler.c
src/gallium/drivers/zink/zink_program.c
src/gallium/drivers/zink/zink_types.h