Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> --- src/intel/vulkan/anv_allocator.c | 8 +++++--- src/intel/vulkan/anv_device.c | 8 +++++--- src/intel/vulkan/anv_private.h | 3 ++- src/intel/vulkan/genX_query.c | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c index 1e4bb34ee2..dc9b55b4a6 100644 --- a/src/intel/vulkan/anv_allocator.c +++ b/src/intel/vulkan/anv_allocator.c @@ -1020,7 +1020,8 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo, uint32_t size) struct anv_bo new_bo; - result = anv_bo_init_new(&new_bo, pool->device, pow2_size); + result = anv_bo_init_new(&new_bo, pool->device, + pow2_size, ANV_BO_DEFAULT_FLAGS); if (result != VK_SUCCESS) return result; @@ -1134,7 +1135,7 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool, uint32_t size = per_thread_scratch * max_threads[stage]; - anv_bo_init_new(&bo->bo, device, size); + anv_bo_init_new(&bo->bo, device, size, ANV_BO_DEFAULT_FLAGS); /* Even though the Scratch base pointers in 3DSTATE_*S are 64 bits, they * are still relative to the general state base address. When we emit @@ -1237,7 +1238,8 @@ anv_bo_cache_alloc(struct anv_device *device, /* The kernel is going to give us whole pages anyway */ size = align_u64(size, 4096); - VkResult result = anv_bo_init_new(&bo->bo, device, size); + VkResult result = anv_bo_init_new(&bo->bo, device, + size, ANV_BO_DEFAULT_FLAGS); if (result != VK_SUCCESS) { vk_free(&device->alloc, bo); return result; diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index e4c0a1551a..6ecd2960e1 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1122,7 +1122,8 @@ VkResult anv_CreateDevice( if (result != VK_SUCCESS) goto fail_instruction_state_pool; - result = anv_bo_init_new(&device->workaround_bo, device, 1024); + result = anv_bo_init_new(&device->workaround_bo, device, + 1024, ANV_BO_DEFAULT_FLAGS); if (result != VK_SUCCESS) goto fail_surface_state_pool; @@ -1406,14 +1407,15 @@ VkResult anv_DeviceWaitIdle( } VkResult -anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, uint64_t size) +anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, + uint64_t size, unsigned flags) { uint32_t gem_handle = anv_gem_create(device, size); if (!gem_handle) return vk_error(VK_ERROR_OUT_OF_DEVICE_MEMORY); anv_bo_init(bo, gem_handle, size); - anv_bo_set_flags(device, bo, ANV_BO_DEFAULT_FLAGS); + anv_bo_set_flags(device, bo, flags); return VK_SUCCESS; } diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index ebf9533390..ef8e70ed47 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -828,7 +828,8 @@ anv_bo_set_flags(const struct anv_device *device, (EXEC_OBJECT_SUPPORTS_48B_ADDRESS | \ EXEC_OBJECT_ASYNC) -VkResult anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, uint64_t size); +VkResult anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, + uint64_t size, unsigned int flags); struct anv_reloc_list { uint32_t num_relocs; diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c index 22de3c3363..6c7dfb5300 100644 --- a/src/intel/vulkan/genX_query.c +++ b/src/intel/vulkan/genX_query.c @@ -86,7 +86,7 @@ VkResult genX(CreateQueryPool)( pool->slots = pCreateInfo->queryCount; uint64_t size = pool->slots * pool->stride; - result = anv_bo_init_new(&pool->bo, device, size); + result = anv_bo_init_new(&pool->bo, device, size, ANV_BO_DEFAULT_FLAGS); if (result != VK_SUCCESS) goto fail; -- 2.11.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev