radv: do not free the GS copy shader binary if created from a library

Similar to other shader stages.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18672>
This commit is contained in:
Samuel Pitoiset
2022-09-13 18:06:21 +02:00
committed by Marge Bot
parent 25ead8ec5c
commit 2fd3b0bceb

View File

@@ -4147,7 +4147,7 @@ radv_create_shaders(struct radv_pipeline *pipeline, struct radv_pipeline_layout
}
}
if (pipeline->gs_copy_shader) {
if (pipeline->gs_copy_shader && !(flags & VK_PIPELINE_CREATE_LIBRARY_BIT_KHR)) {
free(pipeline->gs_copy_shader->binary);
pipeline->gs_copy_shader->binary = NULL;
}