Mesa (staging/19.3): anv: Set the batch allocator for compute pipelines
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 31 22:15:30 UTC 2019
Module: Mesa
Branch: staging/19.3
Commit: 3544a01121c36d08117193b4e392b6910fd749aa
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3544a01121c36d08117193b4e392b6910fd749aa
Author: Jason Ekstrand <jason at jlekstrand.net>
Date: Wed Oct 30 14:37:45 2019 -0500
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 <lionel.g.landwerlin at intel.com>
(cherry picked from commit 9ef198c59a0cf003b4545e345d34b93d9e4c538b)
---
src/intel/vulkan/genX_pipeline.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 203b1f25310..97dd2009b7a 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;
More information about the mesa-commit
mailing list