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 a140217..28271ed 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 f5f43d5..1a193d9 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);
 }