summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_pipeline.c
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-11-13 21:49:39 -0800
committerJason Ekstrand <[email protected]>2015-11-13 21:49:41 -0800
commit91bc4e7cec4098000f3d9a265e7db7907a686e5a (patch)
treea93f3d536c30244671073a2ccb7da9968cc67873 /src/vulkan/anv_pipeline.c
parentc1733886a6ba28d781da14fa2c6bc4ddf5ef675d (diff)
anv/pipeline: Don't free blend states that don't exist
Compute pipelines don't need a blend state so we shouldn't be unconditionally freeing it.
Diffstat (limited to 'src/vulkan/anv_pipeline.c')
-rw-r--r--src/vulkan/anv_pipeline.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vulkan/anv_pipeline.c b/src/vulkan/anv_pipeline.c
index 124140fa224..a9cf16f79c2 100644
--- a/src/vulkan/anv_pipeline.c
+++ b/src/vulkan/anv_pipeline.c
@@ -244,7 +244,8 @@ void anv_DestroyPipeline(
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);
+ if (pipeline->blend_state.map)
+ anv_state_pool_free(&device->dynamic_state_pool, pipeline->blend_state);
anv_device_free(pipeline->device, pipeline);
}