summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_allocator.c11
-rw-r--r--src/intel/vulkan/anv_device.c12
-rw-r--r--src/intel/vulkan/genX_query.c7
3 files changed, 23 insertions, 7 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index b1efd324f51..ab825cdbc36 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -884,6 +884,12 @@ anv_bo_pool_alloc(struct anv_bo_pool *pool, struct anv_bo *bo, uint32_t size)
if (result != VK_SUCCESS)
return result;
+ if (pool->device->instance->physicalDevice.supports_48bit_addresses)
+ new_bo.flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+
+ if (pool->device->instance->physicalDevice.has_exec_async)
+ new_bo.flags |= EXEC_OBJECT_ASYNC;
+
assert(new_bo.size == pow2_size);
new_bo.map = anv_gem_mmap(pool->device, new_bo.gem_handle, 0, pow2_size, 0);
@@ -1013,7 +1019,10 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
*
* so nothing will ever touch the top page.
*/
- bo->bo.flags &= ~EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+ assert(!(bo->bo.flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS));
+
+ if (device->instance->physicalDevice.has_exec_async)
+ bo->bo.flags |= EXEC_OBJECT_ASYNC;
/* Set the exists last because it may be read by other threads */
__sync_synchronize();
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index e8ddf9faeed..b07def96288 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1562,12 +1562,6 @@ anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, uint64_t size)
anv_bo_init(bo, gem_handle, size);
- if (device->instance->physicalDevice.supports_48bit_addresses)
- bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
-
- if (device->instance->physicalDevice.has_exec_async)
- bo->flags |= EXEC_OBJECT_ASYNC;
-
return VK_SUCCESS;
}
@@ -1627,6 +1621,12 @@ VkResult anv_AllocateMemory(
mem->map = NULL;
mem->map_size = 0;
+ if (pdevice->supports_48bit_addresses)
+ mem->bo.flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+
+ if (pdevice->has_exec_async)
+ mem->bo.flags |= EXEC_OBJECT_ASYNC;
+
*pMem = anv_device_memory_to_handle(mem);
return VK_SUCCESS;
diff --git a/src/intel/vulkan/genX_query.c b/src/intel/vulkan/genX_query.c
index 2c70b4f528e..d5052b7f2e3 100644
--- a/src/intel/vulkan/genX_query.c
+++ b/src/intel/vulkan/genX_query.c
@@ -39,6 +39,7 @@ VkResult genX(CreateQueryPool)(
VkQueryPool* pQueryPool)
{
ANV_FROM_HANDLE(anv_device, device, _device);
+ const struct anv_physical_device *pdevice = &device->instance->physicalDevice;
struct anv_query_pool *pool;
VkResult result;
@@ -90,6 +91,12 @@ VkResult genX(CreateQueryPool)(
if (result != VK_SUCCESS)
goto fail;
+ if (pdevice->supports_48bit_addresses)
+ pool->bo.flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
+
+ if (pdevice->has_exec_async)
+ pool->bo.flags |= EXEC_OBJECT_ASYNC;
+
/* For query pools, we set the caching mode to I915_CACHING_CACHED. On LLC
* platforms, this does nothing. On non-LLC platforms, this means snooping
* which comes at a slight cost. However, the buffers aren't big, won't be