Mesa (master): anv: Re-capture all batch and state buffers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Dec 7 04:04:08 UTC 2019


Module: Mesa
Branch: master
Commit: bce1c3c668223254c4cb4ba4e83aed8c3e22b469
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bce1c3c668223254c4cb4ba4e83aed8c3e22b469

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Dec  6 18:11:14 2019 -0600

anv: Re-capture all batch and state buffers

When we moved from allocating BOs directly to using the BO cache, we
lost the EXEC_OBJECT_CAPTURE flag on all our state buffers.

Fixes: 3119b96bdf57 "anv: Allocate block pool BOs from the cache"
Fixes: ee77938733cd "anv: Allocate batch and fence buffers from..."
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>

---

 src/intel/vulkan/anv_allocator.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 6e75904ab1c..82fec5262c3 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -487,14 +487,10 @@ anv_block_pool_expand_range(struct anv_block_pool *pool,
     * hard work for us.  When using softpin, we're in control and the fixed
     * addresses we choose are fine for base addresses.
     */
-   enum anv_bo_alloc_flags bo_alloc_flags = 0;
+   enum anv_bo_alloc_flags bo_alloc_flags = ANV_BO_ALLOC_CAPTURE;
    if (!pool->use_softpin)
       bo_alloc_flags |= ANV_BO_ALLOC_32BIT_ADDRESS;
 
-   uint64_t bo_flags = 0;
-   if (pool->device->instance->physicalDevice.has_exec_capture)
-      bo_flags |= EXEC_OBJECT_CAPTURE;
-
    if (pool->use_softpin) {
       uint32_t new_bo_size = size - pool->size;
       struct anv_bo *new_bo;
@@ -1315,7 +1311,8 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, uint32_t size,
    VkResult result = anv_device_alloc_bo(pool->device,
                                          pow2_size,
                                          ANV_BO_ALLOC_MAPPED |
-                                         ANV_BO_ALLOC_SNOOPED,
+                                         ANV_BO_ALLOC_SNOOPED |
+                                         ANV_BO_ALLOC_CAPTURE,
                                          0 /* explicit_address */,
                                          &bo);
    if (result != VK_SUCCESS)




More information about the mesa-commit mailing list