vk/pipeline: Move freeing the program stream to pipeline.c
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 8 Jun 2015 21:27:02 +0000 (14:27 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 8 Jun 2015 21:27:04 +0000 (14:27 -0700)
It's created in pipeline.c so we should free it there.

src/vulkan/compiler.cpp
src/vulkan/pipeline.c

index a140217c4f4348eb8c8f3cbb37918d20d15653de..28271edaabe92389c55fc605cc651a30891b2730 100644 (file)
@@ -1006,8 +1006,6 @@ anv_compiler_free(struct anv_pipeline *pipeline)
    for (uint32_t stage = 0; stage < VK_NUM_SHADER_STAGE; stage++)
       if (pipeline->prog_data[stage])
          free(pipeline->prog_data[stage]->map_entries);
-
-   anv_state_stream_finish(&pipeline->program_stream);
 }
 
 }
index f5f43d5a76e00c6b8414de38ccff35f31214a121..1a193d91e09196e8124b4ec444e3532d1930b8fc 100644 (file)
@@ -379,6 +379,7 @@ anv_pipeline_destroy(struct anv_device *device,
 
    anv_compiler_free(pipeline);
    anv_reloc_list_finish(&pipeline->batch.relocs, pipeline->device);
+   anv_state_stream_finish(&pipeline->program_stream);
    anv_state_pool_free(&device->dynamic_state_pool, pipeline->blend_state);
    anv_device_free(pipeline->device, pipeline);
 }