anv: add BO flag for internal driver allocations
Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26843>
This commit is contained in:

committed by
Marge Bot

parent
82c08c4141
commit
6933257211
@@ -378,7 +378,8 @@ anv_block_pool_init(struct anv_block_pool *pool,
|
||||
ANV_BO_ALLOC_FIXED_ADDRESS |
|
||||
ANV_BO_ALLOC_MAPPED |
|
||||
ANV_BO_ALLOC_HOST_CACHED_COHERENT |
|
||||
ANV_BO_ALLOC_CAPTURE;
|
||||
ANV_BO_ALLOC_CAPTURE |
|
||||
ANV_BO_ALLOC_INTERNAL;
|
||||
|
||||
result = anv_block_pool_expand_range(pool, initial_size);
|
||||
if (result != VK_SUCCESS)
|
||||
@@ -1262,7 +1263,8 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
|
||||
* so nothing will ever touch the top page.
|
||||
*/
|
||||
const enum anv_bo_alloc_flags alloc_flags =
|
||||
devinfo->verx10 < 125 ? ANV_BO_ALLOC_32BIT_ADDRESS : 0;
|
||||
ANV_BO_ALLOC_INTERNAL |
|
||||
(devinfo->verx10 < 125 ? ANV_BO_ALLOC_32BIT_ADDRESS : 0);
|
||||
VkResult result = anv_device_alloc_bo(device, "scratch", size,
|
||||
alloc_flags,
|
||||
0 /* explicit_address */,
|
||||
|
@@ -2821,7 +2821,8 @@ anv_device_init_trivial_batch(struct anv_device *device)
|
||||
{
|
||||
VkResult result = anv_device_alloc_bo(device, "trivial-batch", 4096,
|
||||
ANV_BO_ALLOC_MAPPED |
|
||||
ANV_BO_ALLOC_HOST_COHERENT,
|
||||
ANV_BO_ALLOC_HOST_COHERENT |
|
||||
ANV_BO_ALLOC_INTERNAL,
|
||||
0 /* explicit_address */,
|
||||
&device->trivial_batch_bo);
|
||||
if (result != VK_SUCCESS)
|
||||
@@ -3409,7 +3410,8 @@ VkResult anv_CreateDevice(
|
||||
result = anv_device_alloc_bo(device, "workaround", 8192,
|
||||
ANV_BO_ALLOC_CAPTURE |
|
||||
ANV_BO_ALLOC_HOST_COHERENT |
|
||||
ANV_BO_ALLOC_MAPPED,
|
||||
ANV_BO_ALLOC_MAPPED |
|
||||
ANV_BO_ALLOC_INTERNAL,
|
||||
0 /* explicit_address */,
|
||||
&device->workaround_bo);
|
||||
if (result != VK_SUCCESS)
|
||||
@@ -3440,7 +3442,7 @@ VkResult anv_CreateDevice(
|
||||
|
||||
result = anv_device_alloc_bo(device, "ray queries",
|
||||
ray_queries_size,
|
||||
0,
|
||||
ANV_BO_ALLOC_INTERNAL,
|
||||
0 /* explicit_address */,
|
||||
&device->ray_query_bo);
|
||||
if (result != VK_SUCCESS)
|
||||
@@ -3513,7 +3515,7 @@ VkResult anv_CreateDevice(
|
||||
result = anv_device_alloc_bo(device,
|
||||
"rt-btd-fifo",
|
||||
btd_fifo_bo_size,
|
||||
0 /* alloc_flags */,
|
||||
ANV_BO_ALLOC_INTERNAL,
|
||||
0 /* explicit_address */,
|
||||
&device->btd_fifo_bo);
|
||||
if (result != VK_SUCCESS)
|
||||
|
@@ -442,6 +442,9 @@ enum anv_bo_alloc_flags {
|
||||
*/
|
||||
ANV_BO_ALLOC_IMPORTED = (1 << 18),
|
||||
|
||||
/** Specify whether this BO is internal to the driver */
|
||||
ANV_BO_ALLOC_INTERNAL = (1 << 19),
|
||||
|
||||
/** Specifies that the BO should be cached and coherent. */
|
||||
ANV_BO_ALLOC_HOST_CACHED_COHERENT = (ANV_BO_ALLOC_HOST_COHERENT | ANV_BO_ALLOC_HOST_CACHED),
|
||||
};
|
||||
|
Reference in New Issue
Block a user