vk/compiler: Free more of prog_data when tearing down a pipeline
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 9 Jun 2015 19:29:37 +0000 (12:29 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 9 Jun 2015 19:36:23 +0000 (12:36 -0700)
src/vulkan/compiler.cpp

index 28271edaabe92389c55fc605cc651a30891b2730..de4d8839f70fc2fb5326846b67ad29fabb47bbb5 100644 (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);
+      }
+   }
 }
 
 }