summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2019-10-30 14:37:45 -0500
committerJason Ekstrand <[email protected]>2019-10-31 13:46:09 +0000
commit9ef198c59a0cf003b4545e345d34b93d9e4c538b (patch)
treef61b0d03bfe59fc3876eecd55d12ad7be6d9a229 /src/intel/vulkan
parent9f665d9c1c3e4a8ec16a350033d7223ce714e74a (diff)
anv: Set the batch allocator for compute pipelines
Otherwise relocations just up and crash. Fixes: a3153162a9b "anv: Delay allocation of relocation lists" Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/genX_pipeline.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index b2cf2a0ac47..27fe6d78912 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -2216,12 +2216,15 @@ compute_pipeline_create(
pipeline->blend_state.map = NULL;
- result = anv_reloc_list_init(&pipeline->batch_relocs,
- pAllocator ? pAllocator : &device->alloc);
+ const VkAllocationCallbacks *alloc =
+ pAllocator ? pAllocator : &device->alloc;
+
+ result = anv_reloc_list_init(&pipeline->batch_relocs, alloc);
if (result != VK_SUCCESS) {
vk_free2(&device->alloc, pAllocator, pipeline);
return result;
}
+ pipeline->batch.alloc = alloc;
pipeline->batch.next = pipeline->batch.start = pipeline->batch_data;
pipeline->batch.end = pipeline->batch.start + sizeof(pipeline->batch_data);
pipeline->batch.relocs = &pipeline->batch_relocs;