vk/compiler: Free more of prog_data when tearing down a pipeline

This commit is contained in:
Jason Ekstrand 2015-06-09 12:29:37 -07:00
parent 66b00d5e5a
commit 9f292219bf

View file

@ -1003,9 +1003,13 @@ anv_compiler_run(struct anv_compiler *compiler, struct anv_pipeline *pipeline)
void
anv_compiler_free(struct anv_pipeline *pipeline)
{
for (uint32_t stage = 0; stage < VK_NUM_SHADER_STAGE; stage++)
if (pipeline->prog_data[stage])
for (uint32_t stage = 0; stage < VK_NUM_SHADER_STAGE; stage++) {
if (pipeline->prog_data[stage]) {
free(pipeline->prog_data[stage]->map_entries);
ralloc_free(pipeline->prog_data[stage]->param);
ralloc_free(pipeline->prog_data[stage]->pull_param);
}
}
}
}